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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      55 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      142 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      160 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      96 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      276 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X