Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Orders carry over to next day.

Is there a way to carry over the unfilled orders to the next day. My algo does stop limit orders which i'd like to continue to the following day(s) until filled.
By cancelling them, they cannot be recalculated the next day because the historic parameters that define them would have changed.

4 responses

No, all orders are cancelled at the end of the day.

Note that data will persist in context so perhaps you can store "the historic parameters" and a list of any orders that might need to be put back in place.

Thank you Grant!
I only want to carry over any partially filled orders.
I am new to python. Do you know the code to store the partially-filled orders and re-establish them the next day?

Have a look at https://www.quantopian.com/help#api-order-methods . I think you can store a list of orders that may have not been filled, and then query them when the market opens the next day. The ones that went unfilled or were only partially filled can be re-submitted.

I suspect a user has developed a nice framework for this, but I don't think Quantopian has an API for this use case.

Hey Grant,

Just want to check whether an array of positions and target weights can be saved so that it can be recalled on any other day.

Issue I am seeing is that the array has to be defined every single day which would erase previous day's stored values.

Alex