When the attached strategy is run on a Playback Connection, the OnExecutionUpdate Callback fires before the SubmitOrderUnmanaged Method returns a reference to the order.
I've added Trace output lines to illustrate this.
Connected to Playback the output is:
***OnExecutionUpdate method called, long stop entry is: null Assigned the longStopEntry order reference in OnBarUpdate
Assigned the longStopEntry order reference in OnBarUpdate ***OnExecutionUpdate method called, long stop entry is: orderId='b7f5181a0082428bbf62832870ad183f' account='Sim101' name='longStopEntry' orderState=Filled instrument='GBPNZD' orderAction=Buy orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Gtc oco='5a947726-1531-4bad-84bd-335676a9007e' filled=1 averageFillPrice=1.73219 onBehalfOf='' id=783 time='2017-02-12 21:25:50' gtd='2099-12-01' statementDate='2017-02-12'
Comment