TimeSpan openTime = TimeSpan.Parse("09:30:00"); //Skip to the next day if we're beyond our open time but outside our play time if (Time.TimeOfDay >= openTime) { var nextDay = Time.Date.AddDays(1) + openTime; Debug(string.Format("EOD on {0}. Skipping to {1}", (Time.Date.Date + Time.TimeOfDay).ToString("MM/dd/yyyy HH:mm:ss"), nextDay.ToString("MM/dd/yyyy HH:mm:ss"))); SetDateTime(nextDay); } else //Skip to start of day if before our open time { Debug(string.Format("Start of day on {0}. Skipping to {1}", Time.Date.ToString("MM/dd/yyyy"), (Time.Date + openTime).ToString("MM/dd/yyyy HH:mm:ss"))); SetDateTime(Time.Date + openTime); }

In regards to the function SetDateTime() I assumed while back testing it would allow me to move forward in time. Essentially while playing /ES there is a lot of downtime between the timeframes I actually play and to make backtesting faster (so it's not sending data for each second outside of my playtime (09:30 - 10:30)) for no reason.

Anyone have an idea about this or a means for me to bypass the time outside my playtime for quick backtesting (I'm already funneling out the data so there is no plays, but it still takes time to go through second by second data across the whole day after)?

Author