Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sequence of IOrder.OrderState values

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

    Sequence of IOrder.OrderState values

    Hi!

    I want to understand the various values that IOrder.OrderState can take and a question on acceptable methods in which to place orders.
    1. Is it correct that there can only be one value on any OnOrderUpdate() call?
    2. If so, what is the typical sequence of OrderState on orders that are ultimately Filled or PartFilled?
    3. After an Order is placed, if it is not cancelled, rejected or unknown, must OrderState.Accepted be true on one pass through OnOrderUpdate() followed by OrderState.Working being true on a subsequent pass before OrderState.Filled or OrderState.PartFilled can be true?
    4. Are OrderState.Filled, OrderState.Cancelled, and OrderState.Rejected all final after which the OrderState for a given IOrder will never change?
    5. Is it acceptable to place, modify, or cancel orders within the OnOrderUpdate() method (or, for that matter, within any method other than OnBarUpdate())? If so, is there any additional bookkeeping that must be included in one's logic?

    Thank you,

    Ken
    Last edited by kaydgee; 09-04-2010, 09:44 PM. Reason: Additional questions regarding OnOrderUpdate()

    #2
    Ken,

    1. Yes, as OnOrderUpdate() gets called for each order state change.
    2. You would get the OnOrderUpdate call first, then OnExecution and lastly a OnPositionUpdate, as it's 'booked' http://www.ninjatrader-support.com/H...AppendixA.html (those may vary across providers and order types
    3. If the order goes straight to the exchange (depends on type / connection), you would not see a accepted state, it would working and partfilled / filled.
    4. Those are terminal order states, correct.
    5. This is definitly possible, please see this sample here as an intro - http://www.ninjatrader.com/support/f...ead.php?t=7499

    In NT 6.5 you can use the unqiue tokens to compare for equality, in NT7 the direct IOrder object can be used.

    Comment


      #3
      Thank you, Bertrand.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      646 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      367 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      108 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      570 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X