I've tried controlling it myself with logic that looks like this:
/// Market Hours Filter
//
DateTime t = DateTime.Now;
bool tradeable = t > Convert.ToDateTime("4:00:00 PM") || t < Convert.ToDateTime("2:00:00 PM") ? true : false; /// 2pm - 2:30pm closing only
if (!tradeable) Print("Prepping day end. Closing only"); /// control in openTrades section
But it seems that doesn't work when running replay I believe perhaps because DateTime.Now grabs the current time instead of the time from the market replay. Is there another way?
Mark
Comment