Trigger function call at specific time and repeat every X minutes

50 Views Asked by At

Running on the 1HR chart I have a need to schedule a function() call to perform a scan at 09:05 and repeat every 60 minutes for 8 times

I don't know how to:

  1. trigger the condition at 09:05
  2. repeat the same trigger 60 minutes (10:05) later

Example:

Starting at 09:05 I would like to call a function every 60 minutes till market close (16:00)

  • 10:05
  • 11:05 etc

I can control the execution using this time window :

TimeWindow=time(timeframe.period,"0900-1600", "GMT")

I have also tried this to get the trigger but this does not run for some reason.

TimeWindow=time(timeframe.period,"0900-1600", "GMT")
myStart = hour == 09 and minute == 05

if myStart and TimeWindow
    // call function here
    alert("new specific trigger", alert.freq_once_per_bar)
0

There are 0 best solutions below