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 amiram, Today, 02:43 AM
        0 responses
        5 views
        0 likes
        Last Post amiram
        by amiram
         
        Started by anmir55, Today, 12:58 AM
        0 responses
        2 views
        0 likes
        Last Post anmir55
        by anmir55
         
        Started by Powerbucker, Today, 12:52 AM
        0 responses
        5 views
        0 likes
        Last Post Powerbucker  
        Started by eduardopoletto, 10-10-2023, 11:47 AM
        7 responses
        646 views
        0 likes
        Last Post onemoretime  
        Started by BadA$$B3ast, Yesterday, 09:15 PM
        0 responses
        7 views
        0 likes
        Last Post BadA$$B3ast  
        Working...
        X