Hi everyone, noticed an interesting thing. If I have 2 bracket orders (with take profit and stop loss) on the same contract and one stop loss triggered then it cancel another stop loss, but closes position with quantity specified in triggered bracket order. So I end up with open position without any stop loss or take profit.
I figured out that I can check if there are open orders and add their quantity to a quantity of a new brackets stop loss/take profit order.
But maybe there is some other way to figure this out. Maybe there is some way to made TWS close position with all quantity specified in all open orders.
I figured out that I can check if there are open orders and add their quantity to a quantity of a new brackets stop loss/take profit order.
But maybe there is some other way to figure this out. Maybe there is some way to made TWS close position with all quantity specified in all open orders.