Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

state of the ninjatrader

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

    state of the ninjatrader

    There are many state such as :
    1) State.Configure
    2) State.Realtime
    3) State.DataLoaded
    ........ and so on.
    ** Still have a lot but I didnt mentioned it out.

    Can i know what is the sequence of all the state happens ??

    #2

    Huh? What?
    Why do you want to know that?

    You're not supposed to care.
    I mean, the exact sequence is not supposed to be that important.

    State is not documented as a precise sequence of changes.

    Ok, so with that said ...

    Carefully study OnStateChange for details on which events cause
    each State change.

    Generally speaking, the state changes do happen in the order
    they are documented -- but you won't find an explicit guarantee
    on 'sequence' in the documentation. (*)

    Remember, NinjaTrader is completely event driven, so the exact
    sequence of state changes you would see depends on the events
    that happen to transpire.

    Thankfully, most events tend to happen in a certain order, so the
    sequence of states is generally predictable. The OnStateChange
    page has all the details. Just realize 'sequence' is mostly inferred
    by the reader.

    (*) Advanced concepts, including a state change diagram, are here.

    Comment


      #3
      Hello Nick123,

      Thank you for your post.

      bltdavid is correct. The state changes do happen in the order they are documented in the OnStateChange() help guide page. However, NinjaTrader is completely event-driven so the exact sequence of State changes you would see depends on the events that happen in your script.

      NinjaTrader uses a State change system to represent various life cycles of your NinjaScript object. For more basic indicators and strategies, simply understanding each State described on the OnStateChange() help guide page is sufficient. However, for more advanced development projects, it is critical to understand how NinjaTrader calls these states for various instances throughout the lifetime of the entire application.

      Please review the help guide documentation linked below for more information.
      State - https://ninjatrader.com/support/help.../nt8/state.htm
      OnStateChange() - https://ninjatrader.com/support/help...tatechange.htm
      NinjaScript Lifecycle - https://ninjatrader.com/support/help...fecycle_of.htm

      Let us know if we may assist further.
      Brandon H.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Kaledus, Today, 01:29 PM
      0 responses
      3 views
      0 likes
      Last Post Kaledus
      by Kaledus
       
      Started by PaulMohn, Today, 12:36 PM
      1 response
      15 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by yertle, Yesterday, 08:38 AM
      8 responses
      36 views
      0 likes
      Last Post ryjoga
      by ryjoga
       
      Started by rdtdale, Today, 01:02 PM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by alifarahani, Today, 09:40 AM
      3 responses
      18 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X