TradingView
cryptographic1
2018년 4월 11일 오후 9시 2분

ADX and DI (Average Directional Index) - CORRECT FORMULA 

XRP / DollarBitfinex

설명

So... the popular version of "ADX and DI" shown on tradingview by masanakamura uses some wacky and incorrect formula for DI and uses SMA instead of the Wilder's MA that ADX/DI is supposed to use, and doesn't give the correct ADX and DI values. The Tradingview "Average Directional Index" uses the correct calculation but doesn't show DI+ and DI-. So, here it is with the DI+ and DI- visible. Enjoy!
코멘트
allanster
For those unaware, TradingView provides most of the common indicators with viewable source. If you go to Pine Editor and click [New] there is a drop down list containing each of them. Click "Directional Movement Index" for example, and you will see that indicator's source loaded in the Pine Editor window. You can then click [Save] if you wish to save a copy and/or click [Add to Chart] if you wish to load it. Once loaded, you will see it contains both ADX and DI. The "Directional Movement Index" indicator source provided by TradingView in Pine Editor's [New] list exactly matches with the readings of the author's source displayed above, only difference being that TradingView's script is set for higher precision.

When you encounter an indicator from the public library that seems off, it is useful to check and compare from this alternate repository accessed from the Pine Editor.
allanster
^ Typo in 2nd sentence above, missing the word [New] -> "If you go to Pine Editor and click [New] there is a drop down list containing each of them."
allanster
Apparently TradingView is removing anything I type with "bracket word bracket" so one more time with quotes instead of brackets lol...

For those unaware, TradingView provides most of the common indicators with viewable source. If you go to Pine Editor and click "New" there is a drop down list containing each of them. Click "Directional Movement Index" for example, and you will see that indicator's source loaded in the Pine Editor window. You can then click "Save" if you wish to save a copy and/or click "Add to Chart" if you wish to load it. Once loaded, you will see it contains both ADX and DI. The "Directional Movement Index" indicator source provided by TradingView in Pine Editor's "New" list exactly matches with the readings of the author's source displayed above, only difference being that TradingView's script is set for higher precision.

When you encounter an indicator from the public library that seems off, it is useful to check and compare from this alternate repository accessed from the Pine Editor.
DavidMcEwan
@allanster, Hello dear Allanster,
I like this ADX indicator very much and I am wanting to have it converted for use on MetaTrader4/ 5. Unfortunately their is currently no accurate ADX indicator for the MT4 trading platform. After searching many forum threads, I was directed to this TV indicator, as an example of a correctly coded ADX indicator. Is this something you have the skills to do, or do you know a programmer that could assist me? I thank you greatly.
Warm Regards,
David,
Sydney, Australia
allanster
DavidMcEwan
@allanster, Thank you, I will do that.
Warm regards.
diLiviu
thanks !!!
WSB-Tendies
Thank you for the correct formula. This one works!
scamArtist
thanks man, will try an adaptation for this, good script
rhnene514
wow, simply outstanding. thank you
더보기