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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        151 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        303 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        244 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        345 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        175 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X