I'm using addeddataseries in my script. when I check the time condition using if (BarsInProgress == 2), I get signals that happens after 2:00pm. When I check time condition using if (BarsInProgress == 0), the time check works like it's suppose to. What am I doing wrong?
if (BarsInProgress == 2)
{
if ((Position.MarketPosition == MarketPosition.Flat)
&& (Times[0][0].TimeOfDay >= new TimeSpan(09, 00, 00) && Times[0][0].TimeOfDay < new TimeSpan(14, 00, 00)))
}
Comment