I have had this experience where I submit a
limit order with
time_in_force="day", it gets filled but, the next day the TP and SL orders are cancelled. It seems the
time_in_force is applying to the TP SL limit (and stop) orders too?
If so, is it possible to have the main order TIF be “day” and the TP SL orders TIF be “gtc”?
is it possible to have the main order TIF be “day” and the TP SL orders TIF be “gtc”?
Simulated this behavior by cancelling any unfilled market orders before running today’s trades. It works well as the only orders that should be in the list returned by
list_orders are of type
stop_limit if previous market orders were filled successfully.
But with this, I still don’t get to open a position with a bracket order at a desired price.
list_orders(nested=True) returns only limit orders that have not been filled. This solves it for me.
I can make limit orders with a TIF of
gtc and be able to cancel any that didn’t fill in the last trading session.
Chiming in to say it’d be great to be able to set time_in_force for each leg in a bracket order.
Thanks @timkofu for posting a workaround.