I'm using InteractiveBrokers TWS and want to create an order that will only execute if another order executes. How can I do that? The One-Cancel-All works both ways, one order executing cancels the other, but I want only the execution of a specific order to trigger the execution of another.
Example:
I have a vertical spread,
+1 XYZ PUT 40
-1 XYX PUT 45
On the PUT 45, I have a BUY LIMIT order to close the position with a profit. As soon as that order executes, I have no need for the long PUT 40 position, so I want a MARKET order automatically created to liquidate it.
How can I do that?
I checked the IB order types help but the best workaround I found was to create a conditional order for the long PUT, depending on the price of the short put, which I could set to be equal to the LIMIT price. However, that's brittle, because,
* my PUT 45 closing order might not execute at my limit price and the PUT 40 conditional sees the limit and closes at MARKET and I end up with a naked PUT,
* or if I set the PUT 40 conditional price at the next tick below the LIMIT price, then I risk losing the tick difference.
So is there a way to condition an order to the execution of another order?
Example:
I have a vertical spread,
+1 XYZ PUT 40
-1 XYX PUT 45
On the PUT 45, I have a BUY LIMIT order to close the position with a profit. As soon as that order executes, I have no need for the long PUT 40 position, so I want a MARKET order automatically created to liquidate it.
How can I do that?
I checked the IB order types help but the best workaround I found was to create a conditional order for the long PUT, depending on the price of the short put, which I could set to be equal to the LIMIT price. However, that's brittle, because,
* my PUT 45 closing order might not execute at my limit price and the PUT 40 conditional sees the limit and closes at MARKET and I end up with a naked PUT,
* or if I set the PUT 40 conditional price at the next tick below the LIMIT price, then I risk losing the tick difference.
So is there a way to condition an order to the execution of another order?