Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Intraday Only Help

How can I constrain my algorithms so that they only trade between certain hours of the trading day?

3 responses

Tried using a range of minutes to schedule your function?

Don't really know how to do that; I'm not great at python. Would you be willing to provide or link me a sample I can look at?


This may help:

for i in range(60, 90, 15):  
        schedule_function(trade, date_rules.every_day(), time_rules.market_open(minutes = i))