I run a strategy live with LEAN - it uses EOD data, this means OnData(slice) gets called at 9PM PST. If I encounter broker issues (like the IB Gateway crashing for example) then I miss the 9PM calling of OnData(slice) and I have to enter signals manually which is a major pain.
Is there a way I can call OnData(slice) on demand, maybe after warmup? I have considered doing dumb things like changing my machine's clock, but what I really want to do is push the latest data from my universe through again since often I will miss the 9PM data driving.. can I drive it myself in code?
I am using IQFeed data and LEAN with interactive brokers - for the most part this setup works pretty well but if I encounter some issue around 9PM I am doomed to not have orders generated etc. If I could drive the day's data from IQFeed through again on demand, this would help me a lot.
Thanks,
Charles
Alexandre Catarino
Hi Charles Fort ,
What data will the algorithm use to create a Slice object that is passed to OnData?
Does the historical data request made by the warm-up feature include that data?
If yes, you could do the following HACK:
public override void OnWarmupFinished() => OnData(CurrentSlice);
At this point, the algorithm will pass the last Slice for a second time, but, this time, it will trigger orders because IsWarmingUp is false.
Charles Fort
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!