The strategy has two buttons:
- First button enters long at market and places a tight stop and target with OCO
- Second button submits a market sell order with the same OCO ID
After both the stop and target are in a working state, the next call to OnOrderUpdate will trigger an exit at the market (trying to simulate an in-flight order being placed while the stop and target are being filled).
If I click the "long" button and then the "exit" button, the Market order to sell is filled, and CQG correctly cancels the working Stop and Target orders. I can see from the Trace file that the exit order is "Filled" and that the Stop and Target order both have state "Cancelled" as expected.
However something weird then happens, Ninjatrader attempts to make a modification to one of the orders and CQG throws an error "Compound Order is in a state that prohibits modification"
Comment