Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnOrderUpdate

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

    OnOrderUpdate

    Hello,

    Why the method OnOrderUpdate(..) input parameters contains "Order order " and others input parameters like "limitPrice,stopPrice...."? the parameter "Order order " is already contains these params. Is it not enough to pass only "Order order " as input parameter?

    Sincerely, Kobi

    #2
    Hello Kobi,

    Thank you for your patience.

    The Order object in the overloads is the current state of the Order object. The other overloads are those items in the sequence of the order update.

    So if you want the current most recent update, use Order. However, if you needed to have the sequence of events as they occurred use the value type overloads (limitPrice, stopPrice, etc.).

    Please let me know if you have any questions.

    Comment


      #3
      Hello PatrickH,

      Sorry I didn't understand the answer.
      I understand that the Order object in the overloads is the current state of the Order object.
      but I don't understand
      The other overloads are those items in the sequence of the order update.
      do you have an example to clarify this?

      Sincerely,Kobi

      Comment


        #4
        Hello Kobi,

        Thank you for your response.

        OnOrderUpdate is called in sequence of the updates to the order. Refer to the Help Guide where it mentions the following:
        "the NinjaTrader core may have received "Working" and then "PartFilled" order state change events back from the broker API" ... "NinjaTrader core will take these events and trigger the OnOrderUpdate() method" ... "Thus, when the strategy receives the first "Working" state for an order, the Order object passed in will reflect the "Working" state although the actual order is really in a state of "Part Filled" which is truly reflected in the original Order object"
        Listed at the following link: http://ninjatrader.com/support/helpG...rderupdate.htm

        What this means is if you wanted the current state you would call the Order object and in the example above you would have the state of PartFilled. However, if you needed to process code in the sequence of the order updating then you would call the other overloads for the value types. This would give you first the orderState of Working and then PartFilled.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        52 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        130 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        70 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        43 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        47 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X