Back

ADX 5 period value does not match stockcharts ADX 5 indicator value

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

 

Update Backtest








0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Hey Ville,

There can be a few things which create the discrepancy in indicator values.

First, the daily close/open prices StockCharts feeds into the indicator may be different from the data used in your ADX indicator. This depends on whether StockCharts is using the extended hours market data for its indicator. You can test if this is the case by using extended hours data

self.AddEquity(self.tcker, Resolution.Daily, Market.USA, True, 0, True)


Second, the value of the ADX indicator is not the true value of the ADX at that moment. The value of the ADX indicator asymptotically approaches its true value at a moment over time, as more data has been fed into the indicator.
You can test if this is causing the discrepancy by comparing ADX values after a long warm up period.

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed