You can create a condition as following for time-based exits:
Let’s say you want to exit the strategy after 3:15 PM if none of the exit conditions were met till 3:15 PM. The timeframe (resolution) of your strategy is 15 min.
The 23rd 15 min candle of the day for equity opens at 3:00 PM and closes at 3:15 PM. You can add the following exit condition
Nth Candle (Close, 15min, 23) higher than 0
This will check whether close price at 3:15 PM is higher than 0 or not. Since in all cases, it will be true (not considering Crudeoil Fut
) you will get an exit notification at 3:15 PM.
The candle number is dependent on the candle timeframe. If you use a 5 min timeframe, the 3:15 PM candle will be number 72.