Hello,
I'm trying to make ADX indicator to run with my custom H4 bars, I've checked the documentation here, but haven't found how to do this, I've done it previously with other indicators but ADX is different, so I get: "this is a forward-only indicator" error when trying to use RegisterIndicator.
I would appreciate some guidance, thanks.
Gurumeher Sawhney
The indicator should have been initialized using the following line:
ADX = new AverageDirectionalIndex(Crypto.Symbol, 20);
Because the indicator was not initialized correctly, it was not populating correctly. The documentation on consolidating data shows how the object should have been created. RegisterIndicator was used in the proper way so that was not the cause of the forward-only indicator error. The algorithm below is a working version of the one above:
Xavier R
Thank you, Sawhney,
Question, when should I use ADX() method? I thought it was the same.
Thank you.
Xavier R
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!