Hello! I was trying to setup a daily consolidator for EUR.USD which consolidates at 5pm NewYork time everyday. I tried the solution provided by Alex in: https://www.quantconnect.com/forum/discussion/4835/standardizing-consolidated-daily-data-to-match-default-daily-data
While in my case, the consolidator got triggered on 5pm NewYork time, but it still consolidate data to 12:00 midnight - which is after the triggered time!
Please refer to my backtest attached.
In “Logs” I captured the open and close time of each bar consolidated:
As you see, on “2022-09-12 17:00”, the bar still opened at 00:00 (not something like 2022-09-11 17:00:00). It also closes at 2022-09-13 00:00, which is to the future of the scheduled time - a look ahead bias.
May I know if I miss out something? Thank you!
Gowestyang
I have identified the issue, which is stated in https://www.quantconnect.com/docs/v2/writing-algorithms/consolidating-data/consolidator-types#02-Time-Period-Consolidators: “If you define the time period with a timedelta object, the time starts from the beginning of the day … relative to the data time zone …”
I have created a working solution with Count Consolidator. Backtest attached.
Gowestyang
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!