7am-9am
10am-1pm
2pm-3pm
I cannot seem to figure out how to go about this in code, I have tried using multiple if statements to check if the time was for example later than 7am but earlier than 9am. It didn't work in the backtest however, and the strategy kept taking positions during times when it wasn't supposed to. Any help would be appreciated. Thanks
Comment