Dear all,
Can someone explain why my supertrend indicator is not warming up in this code?
The “STR” in “myplot” should be around 407 but it is around 430. If I run the backtest for a longer period the “STR” eventually becomes correct as enough values are fed into it. But it is not warmed up, which prevents me from live trading my algorithm.
Johan
Yuri Lopukhov
I don't think warm-up is working with dynamic universes. It was mentioned in the old docs but I can't find this in the new ones, so I'm not sure if this is still true. So you might have to warm up your indicators manually.
Johan Ekh
Thank you Yuri!
I did not see anything about autmomatic warm-up not working for dynamic universes in the documentation either. How would a manual warm-up be done in my case?
Yuri Lopukhov
When you create instances of SymbolData in your Alpha model, you need to request history for each symbol added to Universe and use this history to manually warm up indicator.
Johan Ekh
Thanks Yuri! I will try and see if I can make it work.
Louis Szeto
Hi Johan
You might take a look at the alpha.py in this example, for how to warmup indicator in SymbolData class
Best
Louis.
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.
Johan Ekh
Thank you Louis!
That example is quite sophisticated and complex compared to my code. I'm not able to follow it fully. Could you indicate how I should modify my code to warm up the STR indicated on the SPY symbol, which is part of “exclusions”, i.e. it is not in my trading universe?
Thanks in advance
Johan
Johan Ekh
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!