Customized Moving Average Directional Movement

v10.3
Customized Moving Average Directional Movement

When Welles Wilder created his ADX indicator (and the Directional Movement idea) he was doing all the math by hand. You can still see the worksheets he used in his book. His way to make the Average of some numbers was just to take yesterday’s value, divide it by the period, multiply this number times period minus 1 and add today’s value divided the period. Over time this became the Wilder’s average. Since he used normally a 14-period average he was making only 4 operations instead of 15 …. and that was a lot of time saved!!

Needless to say that his average was not the most precise (I could write a lot more on averages) but it was the quickest to calculate and good enough to make his indicators to work fine.

Today with the help of computers we can get much more. I wrote the directional movement code with the possibility to change the type of moving average used. I personally use a weighted moving average and the performance of Wilder’s indicator is, in my opinion and experience, much better.

Blue skies!!

Share this

Risk disclosure:

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 : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Vinks_o_7 • 10/31/2017 #

    Hi Gabri
    Is there a small mistake in the TR computation: this is “mioTR=max(abs(high-close[1]),max(abs(low-close[1]),range))” in lieu of “mioTR=max(abs(high-close),max(abs(low-close),range))” ?

  2. gabri • 10/31/2017 #

    it’s seems correct to me https://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:average_true_range_atr

  3. Vinks_o_7 • 10/31/2017 #

    I looked at your page: It’s written:
    Method 2: Current High less the previous Close (absolute value)
    Method 3: Current Low less the previous Close (absolute value)
    This is why I think there’s a small mistake in the TR computation: this is “mioTR=max(abs(high-close[1]),max(abs(low-close[1]),range))” in lieu of “mioTR=max(abs(high-close),max(abs(low-close),range))”

  4. gabri • 10/31/2017 #

    You are right, I will change it, Thank you!!

  5. Vinks_o_7 • 10/31/2017 #

    Nope…I THANK YOU FOR ALL THE GOOD WORK YOU DID 😉

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Fabian Hi Thomas, thanks for your explanations. Which indicator do you use in the screenshot ...
Thomas Thats On Balance Volume and Bollinger or SMA or what you want. It shows me the volume flow. ...
bertrandpinoy @MAKSIDE I would be grateful if you send me your version. have a nice day
woktrade Superbe !
Vonasi An updated version with a bug fix can be found here: https://www.prorealcode.com/topic/dis...
snucke hey Vonasi is it possible you can help me get this indicator to show how much a market mo...
Vinks_o_7 Vonasi you're a beast !!! ;-)))
pableitor Amazing indicator , you are pushing PRT to the limit! But looking at the scatter its not c...
ALZ Hello, currently, I don't have the same result as above and don't no if it works good in...
JJ Tec Hola. Me gustaría contactar contigo para ver la estrategia..
nilsla1981 Has someone already tested in real ?
Vinks_o_7
3 years ago
IV Mcm I've always wondered how to make the ADX faster, thank you!
Vinks_o_7 You welcome !
Vinks_o_7 Another variation that may be more accurate : we calculate the average of normalized DI's in...
Vinks_o_7 Great, thanks a lot Nicolas !
Teddy Coronak Top Nicolas ! Merci
Andyswede Thank's! Great indicator:)
Ass13 bonjour nicolas j'aime bcoup votre indicateur
bharatjai Script 'Adaptive ATR' has been saved line 24: no viable alternative at input 'lr' Gettin...
Nicolas download the itf file and import it into your platform.
Domenec Hola Pableitor porque aqui lo que pretendo es programar un nuevo codigao mas ajustado para q...
Juanjo Hola Domenec. He visto en los videos que hablas continuamente de mercado de futuros con grá...
Domenec Claro Juanjo de todas maneras en deinversoratrader.com tienes estsos osciladores evolucionad...
AGTrader Interesante, muy visual Doc. Felicidades!!!
Andraxx simplemente impresionante Dom...te sigo en youtube. Me ha gustado tu canal. Gracias por comp...
MauroPro It is possible to apply this indicator ON the chart , because when I try to apply the formul...
Nicolas Yes, just apply it on the price chart by using the wrench on the left upper side of your pri...
MauroPro Hi Nicolas, thanks for the reply, I managed to apply the indicator on the chart.
odin hi luisella, i think breadth indicators a not available in pro realtime, because you the cal...
4example Thank you
Gaby333 to good to be true dosent do anything))
Toto le Heros Thanks Nicolas. I read somewhere that in the calculation, we should round the value of the A...
Nicolas aADX = round(adx[10])
AG1 Thanks Nicolas Still a problem in line 29 Please take a look. thanks again Alex
Nicolas code is modified in the above post, use that one.
AG1 Still a problem in line 29 Please take a look. thanks again Alex
edocasa CIAO , SCUSA SE TI CONTATTO,VOLEVO SAPERE SE SEI UN PROGRAMMATORE,NELCASO SE SARESTI DI...
gabri Non sono un genio ma so fare qualcosa. Posso provare ad aiutarti ma se e' troppo complicato ...

Top