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 avatar
Related users ' posts
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 ...
gabri Agree. Many of those indicators are using very similar ideas. ADX is a very powerful and und...
Marcel But still it is a (lagging) derivation of price itself.
gabri All the indicators are lagging because they are all based on historical data.
Kolle I don't know but i am doing something wrong but obvious to others. I download this indicator...
Nicolas Change the price scale to use "price only".
Kolle Hi. Thank you so much for helping out Nicolas. At last i found where to set the configurati...
vuduyet94@gmail.com Hi. I want Indicator Reversal Bars. I look in the library without seeing. hope the helping. ...
flodefacebook Merci Nicolas pour cet indicateur. Très utile dans une technique de retournement.
HeikinAshi thank you for this very interesting indicator Nicolas! did you define a tradable setup fo...
nwesterhuijs Thanks, only saw it just now.
juanj For the latest version and discussions see the Ichimoku thread here: https://www.prorealcod...
Louwrens Hi Juanj. Thanks for this. I am tying it as we speak. It does not trade that often, which is...
Maz
7 years ago
Francesco78 very nice, thanks!
Wilko Interesting! Thanks for sharing!
BjornH Extremely nice, thanks!
Francesco78 Hi Pepmartorell, please let's continue the discussion on the forum thread so that we can sha...
Francesco78 Hi Pepmartorell, please let's continue the discussion on the forum thread so that we can sha...
Jusmih1 Hi there, i am looking at your Strategy however when you put in automatic trading mode its ...
finplus Thanks for the job. Which variables do you suggest for timeframe 1 hour? 
Maz Depends massively on your market and the volatility. I suggest using the variable optimizer ...
1Randy This a great momentum filter! I would like to see volume momentum incorporated into the indi...
Naren Yanan what is    diplus  diminus  please
Barney Has anyone tested this algon now when PRT 10.3 was released?
Yngve does anyone know if the issue with the TP/SL is resolved ?
Investment Account Wow great thanks ... looks good! Do I set the colour shades up from within the indicator 's...
avatar
Anonymous Thanks for your comments and yes, that is exactly how I set up the colour levels.
Vish Thanks I have added this in my watch list. Has anyone tried it yet ? Does it work on currenc...

Top