Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Temporarily restricting trading decisions at end of day?

Hey guys, so the algorithm that I'm building automatically makes buy/sell decisions at regular intervals throughout the day. I'm using schedule_function and order_target_percent to exit all of the account's positions 30 minutes prior to the end of the trading day, however, I am not sure how to pause my buy/sell decisions after that happens. As you can probably tell, I am new to coding, and this is mostly just a learning experience for me. Any suggestions on how to solve my problem?

Thank you

1 response

It is not clear exactly what you are looking for.
As far as "sell and wait" aka pause goes, you can go to https://www.quantopian.com/posts/robin-hood-vix-mix-rogue-trader
and search for SellAndWait in the algo code. Maybe that will be similar to what you are wanting.