I am looking to close any open positions and prevent entry between the times of 1224 and 1235 on Friday. I am using a 60 minute chart, with calculate on close = False.
What I have is the following;
if (Time[0].DayOfWeek == DayOfWeek.Friday && (ToTime(Times[0]) >= 122400 && ToTime(Time[0]) <= 123500)) { ExitShort(); ExitLong(); } else { // Do something }
Comment