Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Problem launching algorithms intraday

Attempting to do the following:
-Launch selected algorithms intraday based on market conditions
-Make sure at least 20 min has passed since market open, for history to populate.
-Stop trading 5 min prior to close
-Close all positions 2 min prior to close

My current method, using schedule_function as a flag to start and stop trading does not allow for launching intraday, unless I manually change the start trade time before launch. Any ideas on the best way to achieve this?