Corrected Average indicator by A.Uhl (also known as the “Optimal Moving Average“).
The strengths of the corrected Average (CA) is that the current value of the time series must exceed a the current volatility-dependent threshold, so that the filter increases or falls, avoiding false signals in trend is weak phase.
– by Prof. A.Uhl –
This moving average have the advantage to avoid some whipsaws. It can also act as support and resistance line.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
//parameters : // length = 35 if(barindex>length) then n=length SA = average[n](close) v1 = SQUARE(STD[n](close)) v2 = SQUARE(CA[1]-SA) if(v2<v1) then k=0 else k=1-v1/v2 CA=CA[1]+K*(SA-CA[1]) endif endif RETURN CA as "corrected moving average" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Bonjour Nicolas, j’ai une question à propos de ce code, il faut que je la pose en anglais car votre texte d’accompagnement est en anglais ? Merci
En français pas de problème