I bulid a custom indicator and try to warm it up.
This should initate the warm up: self.slopy[symbol].Warmup(history)
I commented it out in the code as it gives the following error:
During the algorithm initialization, the following exception has occurred: TypeError : 'custom_slope' object is not subscriptable at Initialize in main.py:line 20 :: self.slopy[symbol].Warmup(history) TypeError : 'custom_slope' object is not subscriptableThe custom indicator is very similar from this discussion:
https://www.quantconnect.com/forum/discussion/9976/custom-indicators-history-in-alpha-framework/p1What do I need to change?
Carsten
Some improvements but still not warm up, ist should start at 1. Jan.
could someone help me on this? Thankx
Shile Wen
Hi Carsten,
This is because we need to index the DataFrame by a Symbol and not by the name of the indicator. Furthermore, our Indicator should have an .IsReady field. Please see these changes in the attached backtest.
Best,
Shile Wen
Carsten
Thank you Shile
Carsten
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!