Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Question on order_target_value

I am requesting orders to be placed using order_target_value(sid, amount) API. My question is say I call this API from handle_data(context, data) method so that it runs every minute; Will the orders placed in the previous minute bar be cancelled by the call in the next minute bar?

1 response

Nope. You either need to manually cancel the orders or check for existing orders. Otherwise you'll double order and leverage will get WAY out of control.

get_open_orders(stock)