Using only time rules in the scheduling framework, how can one schedule an event to fire every X mins, starting from Y mins after opening bell, and stopping at Z mins before closing bell?
For example: Where x=10, y=45, z=60:Starting 45 mins after opening bell (10:15am), call exitSignalCheck() every 10 mins. Once it is 60 mins before close (3:00pm), stop checking.
Ideally I want to only use the scheduling framework: “self.Schedule.On” and some combination of TimeRules. If that’’s not possible, please advise some other efficient way.
Varad Kabade
Hi .ekz.,
For the above implementation, we recommend creating scheduled events in a loop. Refer to the attached backtest
Best,
Varad Kabade
.ekz.
Cheers, Varad kabade . This is an interesting approach --it definitely does work.
I was hoping for something more like: after(x).forEvery(y).Before(z)
But I suppose it would be doing the same thing under the hood.
Thanks!
.ekz.
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!