Hi all,
I developed some strategies in Zorro, some of which use the ADX indicator. I then converted a couple of the strategies to Python using ta library for paper trading. However, I realised that the ADX indicator in ta library provides different numbers to Zorro even when using the same dataset meaning I cannot replicate the buy and sell signals. I also tried making my own ADX figure without using ta library but this matched the ta library figure and not the Zorro figure. I also checked tradingview and this also seems to match ta library and not the Zorro figure.
An example below for ADX 14 on SPY daily data:
Zorro Others
[193: Tue 25-05-20] 21.64 20.72
[194: Wed 25-05-21] 21.74 20.24
[195: Thu 25-05-22] 21.19 19.73
[196: Fri 25-05-23] 19.80 18.55
I had a look through the documentation but I can't find an obvious explanation. The only thing I can think of is the smoothing method used to create the PlusDI figure may be different:
"PlusDI: Plus Directional Indicator, a part of the DX indicator, ratio of a smoothed PlusDM to ATR in percent. In the first version the current asset price series is used."
When I created the indicator manually I used the formula described here:
https://chartschool.stockcharts.com...indicators/average-directional-index-adxOR because I am a noob I am doing something completely wrong. In an ideal world I want to recreate the Zorro ADX figure in python because I have done all the backtesting in Zorro.
Any help which explains the difference appreciated!