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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      40 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      27 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      44 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      37 views
      0 likes
      Last Post CarlTrading  
      Working...
      X