Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Execution Event

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

    Execution Event

    just looking at Execution in Language Reference ...

    Code:
    protected override void OnExecutionUpdate(Execution execution, string executionId, double price, int quantity, MarketPosition marketPosition, string orderId, DateTime time)
    {
      // Assign entryOrder in OnOrderUpdate() to ensure the assignment occurs when expected.
      // This is more reliable than assigning Order objects in OnBarUpdate, as the assignment is not gauranteed to be complete if it is referenced immediately after submitting
      if (order.Name == "myEntryOrder" && orderState == OrderState.Filled)
          entryOrder = order;
     
        if (entryOrder != null && entryOrder == execution.Order)
          Print(execution.ToString());
    }
    can I ask if

    if (order.Name

    should be

    if (execution.Order.Name

    and should comment

    // Assign entryOrder in OnOrderUpdate() be

    //Assign entryOrder in OnExecutionUpdate?

    #2
    Hello delTik,

    Thank you for writing in.

    This is correct. Thank you for catching this error!

    I will be submitting this to product management for correction.

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, Today, 06:46 AM
    0 responses
    8 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, Yesterday, 05:21 PM
    0 responses
    12 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    15 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    82 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    47 views
    0 likes
    Last Post PaulMohn  
    Working...
    X