Metatrader 5 offers 2 different types of ADX ("ADX" and "ADX Wilder") while MT4 only offers the ADX indicator and not the ADX Wilder :
Anybody knows the difference between both indicators ?
Which is the real Welles Wilder ADX indicator ?
Thank you for your help.
I think the best way for you to know the difference is to attach both of them into a chart. The difference will be very clear to you.
ADX Wilder appears to be smoother than ADX
The difference is caused by the rounding policies of the formulae.
"The integer function (INT) is used because the original developer dropped the values after the decimal in the original work on the ADX indicator."
This would explain the "ADX Wilder" version being smoother, and actually less accurate (!), than the "ADX" which seems to be calculated precisely.
ADX was originally revealed to the world in J. Welles Wilder's book "New Concepts in Technical Trading Systems".
A great indicator, and nice to see MQL5 has both 'flavours'.
Edit: Repair link.
Also some versions of ADX use EMA smoothing, which is not quite the same as Wilder smoothing
As seen in the ADX calculation, there
is a lot of smoothing involved and it is important to understand the
effects. Because of Wilder's smoothing techniques, it can take around
150 periods of data to get true ADX values. Wilder uses similar smoothing techniques with his RSI and Average True Range calculations. ADX values using only 30 periods of historical data will not match ADX values using 150 periods of historical data. ADX values with 150 days or more of data will remain consistent.
The first technique is used to smooth each period's +DM1, -DM1 and TR1 values over 14 periods. As with an exponential moving average,
the calculation has to start somewhere so the first value is simply the
sum of the first 14 periods. As shown below, smoothing starts with the
second 14-period calculation and continues throughout.
First TR14 = Sum of first 14 periods of TR1
Second TR14 = First TR14 - (First TR14/14) + Current TR1
Subsequent Values = Prior TR14 - (Prior TR14/14) + Current TR14
The second technique is used to smooth each period's DX value to finish with the Average Directional Index (ADX).
First, calculate an average for the first 14 days as a starting point.
The second and subsequent calculations use the smoothing technique
First ADX14 = 14 period Average of DX
Second ADX14 = (First ADX14 x 13) + Current DX Value
Subsequent ADX14 = (Prior ADX14 x 13) + Current DX Value
MT5 ADXW uses more and differenct smoothing:
MT5 ADX uses TrueRange (TR) for its calculation and ExponentialMovingAverage(EMA) for smoothing of DI+, DI-, Main.
MT5 ADXW uses Smoothed TrueRange (AverageTrueRange [ATR]) for its calculation and SmoothedMovingAverage (SMMA) for smoothing of TR, DI+, DI-, Main.