I don't want my strategy to trade between 3:15 PM CST and 7:00 PM CST. I have the following code in my OnBarUpdate()
if((ToTime(Time[0]) >= 151500 && ToTime(Time[0]) < 190000))
{
return;
}
yet the strategy placed an order last night at 6:30 PM CST.
In backtests it seems to perform correctly. Any ideas?
Shiptastic

Comment