TradingView
cheatcountry
15 Th07 2021 14:31

Ultimate Moving Average [CC+RedK] 

Apple Inc.NASDAQ

Mô tả

The Ultimate Moving Average was created by myself and @RedKTrader and I can proudly say that this is the holy grail of moving averages. Not only does this moving average react to the current price trends like a normal moving average but we have also included the ability to react to volume, momentum, and volatility. The only thing this moving average can't do is wash your car.

The Ultimate Moving Average doesn't even use a set length so it is fully adaptable to any type of market whether it is choppy or trending. It tightens during volatile markets and loosens during choppy markets. I have included 3 of the main moving averages of a fixed length of 20 days to show you just how much better our moving average is.

The overall concept of this moving average was to fully adapt to any and all changes of the underlying stock. We used my Variable Power Weighted Moving Average as a base and changed the script to adapt to momentum instead. The idea behind this was when momentum reaches an extreme in either direction we tighten the moving average to be able to react accordingly. We then used the idea behind my Variable Length Moving Average to be able to react to volatility and make the length itself into a separate variable.

All of this work combined to create the most reactive moving average out there and I guarantee you will be using this in your daily trading! Let me know if there are any other scripts you would like to see me publish.

Phát hành các Ghi chú

Fixed issue with the indicator if there is no volume and added extra smoothing to provide clearer buy and sell signals

Phát hành các Ghi chú

Provided an extra fix in case volume is nan or 0

Phát hành các Ghi chú

Fixed some issues that were pointed out to me by @RedKTrader

Phát hành các Ghi chú

Updated to version 5
Fixed a bug pointed out to me by @Linktind

Phát hành các Ghi chú

Increased max bars back to 3000 to fix issue with some forex not being able to load it on a chart properly
Bình luận
VonnyFX
cheatcountry
@VonnyFX, thank you very much!
AtomOfScent
I converted this into a function for integrating into other indicators. It seems to work, but feel free to point out any errors.

uma(src_, acc_, maxLength_, minLength_, smoothLength_) =>
mean = 0.0, stdDev = 0.0
mean := sma(src_, maxLength_)
stdDev := stdev(src_, maxLength_)
a = 0.0, b = 0.0, c = 0.0, d = 0.0
a := mean - (1.75 * stdDev)
b := mean - (0.25 * stdDev)
c := mean + (0.25 * stdDev)
d := mean + (1.75 * stdDev)

length = 0
length := src_ >= b and src_ <= c ? nz(length[1], maxLength_) + 1 : src_ < a or src_ > d ? nz(length[1], maxLength_) - 1 : nz(length[1], maxLength_)
length := max(min(length, maxLength_), minLength_)
len = 0
len := round(length)

// We are providing a dynamic weight depending on the current momentum
// When momentum is at an extreme for overbought/oversold then we give more weight to the current price
mf = 0.0, mfScaled = 0.0, p = 0.0
mf := na(volume) or volume == 0 ? rsi(src_, len) : mfi(src_, len)
mfScaled := (mf * 2) - 100
p := acc_ + (abs(mfScaled) / 25)

sum = 0.0, weightSum = 0.0
for i = 0 to len - 1
weight = pow(len - i, p)
sum := sum + (src_ * weight)
weightSum := weightSum + weight
uma = wma(sum / weightSum, smoothLength_)
cheatcountry
@AtomOfScent, looks great and I'm not seeing any obvious errors
MollieX
@cheatcountry, Was the bug mentioned on 18th Dec 2021 fixed in this function or could you point it out
oppassmore
Let me tell you how powerful this creation you guys did with this indicator. No one actually can appreciate what you created like I can. I actually discovered this a few weeks back but in a much different perspective. Your indicator is almost the exact Moving Average I came up with to cross a 50 EMA on a 35 minute chart. This is very powerful and very profitable.

I actually had been looking for Heiken Ashi Multi Time Frame indicators that would give me the intent on alerting me when 3 time frames were in sync in order for me to cast out whipsaws and bad entries. I went through a lot of indicators on here. All of them didn't do as I intended but one which was made by DGT that has Moving Averages in it did very close to what I could see in the market. The problem is it didn't have alerts.

So after many trials and errors I came up with 10 EMA shifted at -6. This was the ideal trigger to cross the 50 EMA for riding very long trends. At this time expect about 2-3 whipsaws per week on average per Pair is acceptable for losing trades with this. About 0.025% risk is what I'm experimenting with across 24 pairs. What I'm also expecting is 12+% profit increase per month with lower than 5% in losses per month. That risk may increase a little as time goes on but being conservative is best at this time. I set up alerts for "Crossing Up" and "Crossing Down". Alerts that trigger from here to mt4. Automatic trading. No hands!

Another way (original way) I played this was the 20 EMA -6 shifted crossing the 50 EMA. 30 minute chart. I could see the strong trend for the week so I would set it up for when the EMA 20, -6 triggered in the higher time frames trend direction and let it ride for a week or more. This way was opening trades on Sunday and maybe close them out by Friday. This was about a 10% increase in account per week. 1 loss out of 10 trades. If I set up a Break Even after 10 pips then no losses would happen. Let them winners ride!

You have discovered what I was looking for a long time for. This is very powerful. Lots of traders should consider this and take this very serious.
cheatcountry
@oppassmore, That is great to hear and I would love if you can pm me more details about new strats you find for this indicator
oppassmore
@cheatcountry, I"m fine tuning my strategy a bit more before I get back with you. Working with various ideas for faster Exits. So entry on 30 min and experimenting on exit on 8 minutes.
cheatcountry
@oppassmore, cool let me know
Stockguy0415
@oppassmore, any update?
Thêm nữa