I've set the algorithm's equity resolution to seconds and am trying to consolidate back up to 1-minute bars while also adding them to a rolling window. If the trade logic is met, there should be ZERO trades before the second, 1-minute bar creation of the day (i.e. 0932); however, looking at the back test order results, this is not the case as orders are opening as early as 093006. I've referred to the documentation have have tried both the ‘Rolling Window of Consolidated Bars’ syntax (both ‘seconds=60’ and 'minutes=1') and ‘Manually Consolidating Bar Count’ but to no avail.
Suggestions? Thanks! 😊
Fred Painchaud
Hey James,
Me again. 😊
Your consolidator is registered and feeds your window via the lambda…
…and then you also feed your window inside your OnData…
…which receives what? - second bars.
So what is your logic using thereafter in OnData? - second bars, and also minute bars at the minute gong.
😊
I'm sure it pops out to you now…
→
“data[self.symbol] is None” would not be necessary anymore but it does not hurt too much staying there - especially if you eventually change your algo so OnData uses data[self.symbol].
Fred
James Hawkins
Ah yes- it totally jumps out to me now! I have conflicting consolidations :/
As always, thank you Fred Painchaud 😊
James Hawkins
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!