Topic: Exit Interval indicator
Request: indicator to close at a specified interval, like every 15 minutes, or every hour.
Indicator: Exit Interval
How to Use: in Closing slots, add Bar Closing. Then, add Exit Interval.
Parameters:
Interval Period -- set to every 5 minutes, 15 minutes, 30 minutes, 1 hour, or 4 hours
-- it will change the options so it's always higher than your current time frame
Offset -- move the interval forward this number of bars
Since it's Bar Closing, by default, it sends the close signal at the end of the bar before your target periodicity. This way, the signal comes fairly close to the target time, not after market closes.
Ex: 15 minutes current time frame, Interval Period = 1 hour
Expected: It will send the close signal on the bar at 1:45, 2:45, 3:45 (not 2:00, 3:00, 4:00). This is so that the order will be sent very close to the target time. In the example, the end of bar 1:45 would be 1:59:59.
If you really want it on the 2:00 bar, then set offset to 1.
If you want a 4-hour interval like 1:00, 5:00, 9:00:
- figure out how many bars offset your desired time
(ex: want to adjust by 1 hour, which has 12 bars with current time frame = 5)
- enter in Offset parameter
I think this should work as the requested indicator; feel free to ask or comment if to help make it more useful. I've done a little testing, if there are any crashes or unexpected behavior please advise. This is the first version, so there may be some bugs. Thanks
Repository link: Exit Interval