Mariner Backtesting - Repeat Timers in service object

Overview:

In this lesson, you will learn to set up a repeat timer. A repeat timer will allow you to schedule a frequency with which to call the timer again.

Basic use case:

A repeat timer allows a single timer to be called multiple times. For instance, you might need your timer to check something every 5 minutes. This is where a repeat timer comes in handy.

Interface:
 add_time_trigger( timestamp, repeat_interval, timer_id)
Working Example:

Call on_timer() at 9:30, and then call it again every 5 minutes:

 service.add_time_trigger( service.time(9,30), repeat_interval = service.time_interval(0,5))