Hey everyone,
So I am using 'AddEquity(ticker, Resolution.Minute, Market.USA, True, 1, True).Symbol' to add symbols to my universe. I am using a scheduled event that triggers the event at 6:30am. For some reason, even though I have extended market hours set to 'True', my securities are not being added to the universe until 11am. Does anyone have any idea why that might be? I've looked over almost every relevant forum entry and I couldn't find anything regarding this issue.
Thanks in advance,
Hayden
Hayden Bonneau
Here a backtest showing the issue. In the logs you can see that the securities aren't being added until 11am.Â
I know that AddEquity in this case is not the most efficient way to add securities to my universe, but for my algo I need to do intraday analysis and this is the best way I found. If anyone has any ideas for how to do this better I'm open to suggestions.
Thanks,
Hayden
Derek Melchin
Hi Hayden,
To ensure the methods are called at the correct time, we need to subscribe the algorithm to a security for the entire backtest. See the attached backtest for a working example.
Best,
Derek Melchin
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.
Hayden Bonneau
Hey Derek,
That fixed my problem! I knew it had to be something small just couldn't get there on my own.
Thanks for getting back so quick, very much appreciated.
Have a good one,
Hayden
Hayden Bonneau
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!