I have two events scheduled at 16:00:00 and 16:00:01 respectively. The 16:00:01 event doesn't get triggered on the last day of the run.
QUANTCONNECT COMMUNITY
I have two events scheduled at 16:00:00 and 16:00:01 respectively. The 16:00:01 event doesn't get triggered on the last day of the run.
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.
Vladimir
T C
--> The 16:00:01 event doesn't get triggered on the last day of the run.
But if we specify the instrument traded at that time 16:00:01 event get triggered.
If you are satisfied with my answer, please accept it and don't forget to like it.
Fred Painchaud
Hi TC,
Additional note of interest. Scheduled events past 16h00 won't trigger on the last day of the backtest for equity, and the default when not specified is equity. If you change the setting to extended hours, scheduled events won't trigger on the last day past 20h00 (again, because equity being the default).
Fred
T C
Thanks Vladimir and Fred! I want it for equity without changing the setting to extended hours.
Fred Painchaud
Well.
You could report it as a bug/feature request to support@quantconnect.com. Not sure if it is desired behavior or not to not report scheduled events past market hours on the last day of a backtest…
In the meantime, the easiest fix is to simply make your 16:00:01 event fire at 16:00:00. If you register it after the first one, it will fire after the first one, i.e., order is preserved.
Unless you absolutely want your event2 to fire at 16:00:01 but I doubt it.
Finally, note scheduled events are not asynchronous, as demonstrated.
Fred
T C
Thanks Fred!
T C
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!