Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

State Transition

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

    State Transition

    Dear All,
    I have a strategy which uses a Exit Order which is in the market while in historical state. I like to cancel this order during transition to realtime because in realtime I have some slight different criteria for the exit.
    What I noticed now is:
    - Trying to cancel the exit order during state.transition crashes NT8 because it does not have the reference to the order object any more
    - geting the new object reference through GetRealtimeOrder in state.realtime and then canceling the order works fine

    My question now is:
    What is the sequence in which the states are gone through?
    I would like to cancel my order before I get to state.realtime because I fear that it is send to the broker and causing fees.

    Any help is appreciated.
    Thanks,
    Klaus

    #2
    Hello Klaus,

    Below I am including a link to the help guide on OnStateChange that has a description for when each state will trigger.


    The order of these depends on what is happening as the order will be different depending on what is going on.

    In the case of Historical to Realtime, this will go from State.DataLoaded, to State.Historical, to State.Transition, to State.Realtime.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello Chelsea,
      thanks, but I know that help guide. As I said, to cancel the order in state.transition did crash NT8.Seems I have to get the new ID already in trasition state.
      Thanks,
      Klaus

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      74 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      45 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      26 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      32 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      62 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X