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.
    http://ninjatrader.com/support/helpG...tatechange.htm

    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 sentient254, Yesterday, 04:44 PM
      1 response
      13 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by muratb35, Today, 03:36 AM
      0 responses
      5 views
      0 likes
      Last Post muratb35  
      Started by fernlicht, Today, 02:16 AM
      2 responses
      15 views
      0 likes
      Last Post fernlicht  
      Started by fernlicht, 04-12-2021, 06:01 PM
      1 response
      30 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by memonolog, Today, 02:10 AM
      3 responses
      12 views
      0 likes
      Last Post memonolog  
      Working...
      X