Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnOrderUpdate() doc needs to be updated as API parameters have changed

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

    OnOrderUpdate() doc needs to be updated as API parameters have changed

    Doc is here:




    Instead of all this:

    protected override void OnOrderUpdate(Order order, double limitPrice, double stopPrice, int quantity , int filled, double averageFillPrice, OrderState orderState, DateTime time, ErrorCode error, string comment)

    the function signature for OnOrderUpdate is now this:

    void OnOrderUpdate(object sender, OrderEventArgs e)

    and there are parameters in OrderEventArgs like ServerName and StatementDate that are undocumented. Although hopefully I am just missing something.

    Cheers.


    #2
    Hello carnitron,

    It looks like you are confusing two different topics here.

    You have Strategy based OnOrderUpdate override: https://ninjatrader.com/support/help...ghtsub=onorder

    or

    Account based OrderUpdate event: https://ninjatrader.com/support/help...rderupdate.htm

    These are the same concept but two different base classes and use cases. Strategies use the OnOrderUpdate override and are passed in updates about orders which that strategy submitted. An account has the OrderUpdate event which also has the same event args but is for all orders on the account and is unrelated to any specific strategy. The account based OrderUpdate uses the OrderEventArgs which contains the same items you see in the strategy based override, the strategy based override is simplified and only includes the specific properties for the order update.

    You can use any strategy based information or samples which use OnOrderUpdate to better understand which properties can be used inside the OnOrderUpdate events. There are some undocumented properties, if the property is not documented that generally means it is not intended to be used.

    You can see an example of how you would use the account based OrderUpdate event here: https://ninjatrader.com/support/help...OrderEventArgs

    Comment


      #3
      Thank you for pointing out that there are two versions of this call. I'm not really confused about how to use any of this, I'm a professional software engineer, and this all pretty standard stuff. The issue is that there's no doc for the OrderEventArgs object, and some of the fields that are in that object are not among the parameters passed into the strategy object.

      I've gotta run, and can elaborate further later. Cheers.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      77 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      45 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      27 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      32 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      63 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X