I have this algorithm where I applied :
Schedule.On(DateRules.Every(DayOfWeek.Monday), TimeRules.At(9, 31)
but when i look at the actual trades they are not occuring on Mondays..... the dates are all over the place... Can someone help fix this to calculate and make it execute on the first day of the week. I guess if first day is a holiday the next day....
Code attached
Jared Broad
Hey - it works well for me! Let me know if you still think there's something wrong. I removed alot of the other code in your algorithm and distilled it down to test the scheduled events.
Mon Fired at: 1/8/2018 9:31:00 AM Mon Fired at: 1/15/2018 9:31:00 AM Mon Fired at: 1/22/2018 9:31:00 AM Mon Fired at: 1/29/2018 9:31:00 AM Mon Fired at: 2/5/2018 9:31:00 AM Mon Fired at: 2/12/2018 9:31:00 AM Mon Fired at: 2/19/2018 9:31:00 AM
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.
Jack Pizza
Jared Broad
Weird I don't know whats going on I guess there might be ordering logic issues? These are the trades I'm getting....
It falls, on a Wednesday, Thursday, Friday
2018-01-10T14:31:00Z
2018-01-10T14:31:00Z
2018-01-11T14:31:00Z
2018-01-11T14:31:00Z
2018-01-12T14:31:00Z
2018-01-12T14:31:00Z
Alexandre Catarino
Hi ,
You shouldn't expect trades on your algorithm, because of methods that place orders are being called in OnData. The should be called from a method that is scheduled:
Schedule.On(DateRules.Every(DayOfWeek.Monday), TimeRules.At(9, 31), () => { OnMonday(); });
Jack Pizza
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!