It is working fine on 1m, 2m, 4min charts, exits the trades and draws the magenta line at 10am.
It does not work on non time based charts (range etc) or on 3 minute charts, 5 minutes charts etc. The script is ignored then the trades exit on close of session.
Why is this script not working on non time based charts (and uneven # minute charts)?
// Condition set 2
if (ToTime(Time[0]) == ToTime(10, 0, 0))
{
ExitLong("", "");
ExitShort("", "");
DrawVerticalLine("My vertical line" + CurrentBar, 0, Color.Magenta);
}

Comment