Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OrderState & OnExecution

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

    OrderState & OnExecution

    Hello

    Which OrderStates pass through OnExecution? Do Accepted and Working pass through there?

    I would like to say, "When AdjustedStop has an OrderState of Accepted, Cancel InitialStop"

    Would that go through OnExecution or OnBarUpdate, or under a different method?

    #2
    Hello jg123,

    Thank you for your note.

    OnExecution() is only called when an execution has occurred e.g. a fill
    In this case you would be able to get the Filled and PartFill OrderStates from OnExecution().

    If you want the other OrderStates, you would want to use OnOrderUpdate() when the OrderState has been changed.

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Hi Cal,
      According to the OnORderUpdate() help guide:
      The OnOrderUpdate() method is called everytime an order managed by a strategy changes state. An order will change state when a change in order quantity, price or state (working to filled) occurs

      how do you "catch" an order once its status changed to accepted?

      Thanks

      Comment


        #4
        Dafna,

        You can check using this statement -

        if(order.OrderState == OrderState.Accepted)
        {
        Print("Order was accepted");
        }

        http://www.ninjatrader.com/support/h...tml?iorder.htm
        Cal H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        607 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        353 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        560 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        561 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X