Detailed explanation of the mysterious IB cancel / replace, bug that moves orders to the back of the queue:
Market is quoting 50.05 / 50.06.
I have orders on both sides, limit buy at 50.05, limit sell at 50.06.
One orders is filled.
The other is mysteriously cancelled, then resubmitted, putting it all the way at the end of the queue.
...
It looks like IB internally handles opening and closing orders separately, and for some reason does a cancel / resubmit to the exchange when it's changing over. (One of the orders becomes a close when the other is filled).
The result for customers is adverse selection on the closing order, through the time priority process.
Any customer should be wanting size behind them, and certainly do not want to be the last in the queue on a price step
Unfortunately, being last in the queue is exactly what this cancel/replace process causes.
I hope the fix for this is something simple, because this situation makes a whole category of algo trading strategies unprofitable.
Market is quoting 50.05 / 50.06.
I have orders on both sides, limit buy at 50.05, limit sell at 50.06.
One orders is filled.
The other is mysteriously cancelled, then resubmitted, putting it all the way at the end of the queue.
...
It looks like IB internally handles opening and closing orders separately, and for some reason does a cancel / resubmit to the exchange when it's changing over. (One of the orders becomes a close when the other is filled).
The result for customers is adverse selection on the closing order, through the time priority process.
Any customer should be wanting size behind them, and certainly do not want to be the last in the queue on a price step
Unfortunately, being last in the queue is exactly what this cancel/replace process causes.
I hope the fix for this is something simple, because this situation makes a whole category of algo trading strategies unprofitable.
