- Entry order for 100 shares is fully filled.
- Once filled, a pair of orders is created for 50 of the shares. One of the orders is a stop order and one is a limit order. They are paired with an OCO. A second stop order is created for the other 50 shares.
- The limit order partially fills (say 5 shares) and then the stop order fills for the remaining. The other stop order also fills completely. The account goes to a position of 0.
- The limit order goes to a state of accepted, then cancel submitted, but then proceeds to go to a state of working, partially filled and filled. It then fills for some remaining amount of the shares.
This has happened 3 times so far in testing with a simulation account using live market data. I have yet to be able to reproduce it via market replay of the live data.
Comment