Dear friends,
I'm back home after a trip in the cyberspace. Yesterday evening, before starting re-inventing the wheel, I decided to "drill" the web quite deeply, and...
I FOUND IT!
Thanks to a nice guy called mladen, there is the "right" pure Wilder MT4 ADX / ADXR indicator.
I think mladen is a quite serious and careful "follower" of Wilder's methods: read his/her comments about people "not reading the book".
If you have the chance of looking at the algorithm, it is really "like it has to be" with the original book methods, without any approximation or averaging method "simulating" Wilder's procedure. It is what I also planned to do: but of course having found it spared me a couple of good hours!
Demonstration that it is correct:
I have a script, pulling out of the platform, from the last 100 bars, Date, High, Low, Close, and, from the indicator, +DI, -DI, ADX and ADXR, writing all these data in a text file. In the attachment, you find these data in the
GBPUSD_Book_Indicator.pdf file, which reports the daily data for GBPUSD till Jan 26 (yesterday), with a ADX period of 14, as they are in the FXDD platform.
The file
Wilder_ADX.pdf is the excel worksheet reconstructed from the book, p. 41-42, with the formulas and the data from the book. I have removed part of the "roundings", because I wanted to check the indicators data with the major possible precision. But it is easy to notice the correspondence of these numbers with Wilder's...
...
but! I think I also found a mistake (an "erratum" candidate?). Have you noticed that the first ADXR is calculated on day 41? And that this number is actually the half of the sum of day41 ADX + day28 ADX (
13 days before, and not 14)? The same is true for the ADX of day 42, which is calculated as 0,5*(29 + 17), so again the ADX of today + ADX of
13 days ago. So: as this is clearly different from what explained in the text, I suppose it was just a mistake in "counting the rows" by the old man. This is also what the author of the indicator (mladen) supposed, and so, for my further calculation, this is the only "correction" or modification that I introduced to the excel worksheet: calculating ADXR really as the half-sum of ADX today and ADX
14 days ago. If anybody thinks that this is incorrect, also the indicator can be very easily adapted to accomodate this unique difference.
Finally: the file
GBPUSD_ADX_recalculated.pdf, contains the output of the same excel worksheet, after having pasted the price data of the first file (Date, high, low, close) into the Wilder's worksheet. It is sufficient to compare the +DI, -DI, ADX and ADXR data of the last rows from this file to the ones of the first file (which are calculated not by excel, but by the metatrader indicator) for being convinced of the quality of the algorithm.
I skip further details: feel free to ask!
I hope that this indicator can be useful for all of you using
also metatrader for the "Wilder's adventure"!
In the "cybertrip" I also found quite other amazing things:
a lot of strange and mostly wrong ADX indicators, the fact that probably MT developers are aware that their indicator if wrong, but did not want to include the correct one, people using strange things like one period for the DI's, another for the ADX and still another for ADXR, and similar... but perhaps we can discuss about these things some other time!
In summary: nice! Now I have the tools for going on with filters for the TBPS, in the first place. Then, I can probably also join the DMS experiments!
Bye
Fabio