I attach a custom log to check the execution of my strategy in NT7B14.
CalculateOnBarClose = false;
Unmanaged = true;
TraceOrders = true;
(Please, see the image).
Point 1.- In this moment there is a buy stop order working. These three prints are in the OnOrderUpdate method.
Point 2.- A moment later, one new tick arrives, and the OnBarUpdate method is executed.
Here, the execution is in the OnBarUpdate method.
Coincidentally, the order has been filled at the same time. The order object is updated (his OrderState == Filled). Correct.
(Before passing to the OnOrderUpdate method, all code of the OnBarUpdate method must be executed. Correct).
The order object has been updated, but the Position object does not !!!
(After, the execution passes to the OnOrderUpdate method and after to the OnExecution method and after to the OnPositionUpdate method. Correct).
I hope I explained clearly.
Thanks
Edit: LiveTrading with Interactive Brokers
(In simulation this bug does not occurs)

Comment