Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnExecutionUpdate Callback Called before SubmitOrderUnmanaged Returns

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    OnExecutionUpdate Callback Called before SubmitOrderUnmanaged Returns

    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:
    Code:
    ***OnExecutionUpdate method called, long stop entry is: null
    Assigned the longStopEntry order reference in OnBarUpdate
    and on the simulation feed the output is....

    Code:
    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'
    Hopefully you can reproduce this, because I've literally wasted 2 days trying to figure out why my strategy wasn't working right. Before stripping it right back to this and realising that the playback connection was the issue.
    Attached Files
    Last edited by reach4thelasers; 02-12-2017, 03:43 PM.

    #2
    Hello reach4thelasers,

    Thank you for your patience.

    You would want to assign the order object in OnOrderUpdate() rather than assigning the object in OnBarUpdate. Please refer to the example at the following link: http://ninjatrader.com/support/helpG...rderupdate.htm

    Please let me know if you continue to see this behavior when assigning the order object in OnOrderUpdate.

    Comment


      #3
      Hey Thanks for the assistance... ok.. That explains it. So I need to hook into the OnOrderUpdate event, and identify the order based on the Name property, which is the signal name? Is that correct?

      Is there another way than using Signal names? because my signal names are not unique at present, but I could make them if necessary.

      Comment


        #4
        Originally posted by reach4thelasers View Post
        Hey Thanks for the assistance... ok.. That explains it. So I need to hook into the OnOrderUpdate event, and identify the order based on the Name property, which is the signal name? Is that correct?

        Is there another way than using Signal names? because my signal names are not unique at present, but I could make them if necessary.
        Thank you for your response, reach4thelasers,

        That would be correct, you would need to use the signal name strings given to the orders when calling their function (EnterLong() for example).

        Please let me know if you have any questions.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        81 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        42 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        64 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        66 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        54 views
        0 likes
        Last Post CarlTrading  
        Working...
        X