I am trying to get my script output prints to reset at the start of a new trading days, but all that both of the codes below do, is to disable the script at the end of the day and re-enable it at the start of the next day, while all the prints carry on counting from the day before (such as the List indexes), where as I expected the data prints to start from 0 again, without clearing the Output window.
Is there a way to achieve that?
Thank you
else if (State == State.Configure) { AddDataSeries(Data.BarsPeriodType.Tick, 1); AddDataSeries(null, new BarsPeriod() { BarsPeriodType = BarsPeriodType.Minute, Value = 5 }, "CME US Index Futures ETH", true);
protected override void OnBarUpdate() { // Make sure this strategy does not execute against historical data if (State == State.Historical) return; int startTime = ToTime(23, 0, 0); if (ToTime(Time[0]) >= startTime) { // Script Logic ....
Comment