With RSI I've had the values match stockcharts but for some reason I just can't get ADX value to match. I've attached a simple tester where the value of ADX on back test is 57.49 on 2020-03-21 00:00:00 and stockcharts shows 47.18 (notice the period being 5 in this case). Why the difference?

93506_1584882906.jpg

I see the following discussion where I picked the code from but this should solved long a go. Is there something I'm missing?

https://www.quantconnect.com/forum/discussion/4759/adx-positivedirectionalindex/p1

 

Author