My initial code was something like this
int endTradeTime = 153000; //3.30pm
if ((ToTime(Time[0]) >= startTradeTime && ToTime(Time[0]) < endTradeTime) )
{ allows trading }
edit: found solution.
compare start and end time to establish if it's regular or overnight session.
if regular and now is between start and end => proceed
if overnight and now is not between end and start => proceed


Comment