Time Triggers Question
Dustin_Lang
Posts: 25
Does service.clear_time_triggers( )
clear all time triggers for all symbols? I would like to clear time triggers for a particular symbol and/or a given TimerID but this doesn't seem to be an option?
Tagged:
Comments
At this time, it just clears time trigger for the current instance. We will add the request for clearing by
timer_id
to the backlog. Other users please add a comment if you like the idea.I like it a lot, needless to say that cancelling specific timers adds a lot of flexibility
Yeah I definitely would like to see this!
I also like to have a end_time parameter when set up a time trigger. So, a trigger only lives during a time interval.
current workaround to cancel a time trigger with specific id:
`
from cloudquant.interfaces import Strategy
class test_trigger(Strategy):
`
output :
id-1 2016-12-13 09:40:00.000000
id-1 2016-12-13 09:40:01.000000
id-1 2016-12-13 09:40:02.000000
id-1 2016-12-13 09:40:03.000000
id-1 2016-12-13 09:40:04.000000
id-1 2016-12-13 09:40:05.000000
id-1 2016-12-13 09:40:06.000000
id-1 2016-12-13 09:40:07.000000
id-1 2016-12-13 09:40:08.000000
id-1 2016-12-13 09:40:09.000000
id-stop 2016-12-13 09:40:10.000000
this is id-2 trigger***** SPY 2016-12-13 09:41:00.000000