Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How things work?

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

    How things work?

    I am porting my indicators from NT7 to NT8 . I was surprised to see that State.Terminated in OnStateChange occured before State.Configure and State.DataLoaded occur.
    I can distinguish between "yours" State.Terminated and "mine" State.Terminated , which , i presume should occur , when the indicator is removed from a chart, placing a flag in State.Configure or State.Dataloaded code.
    However I would like to understand how things work internally.
    I generated test indicator, which doesn't do nothing .
    Placing breakpoints in Visual studio I noticed the following scenario:
    1) When "indicators" window is opened on a chart, NT traverses all State.SetDefaults for all items (indicators, strategies, bartypes etc...)
    2) When my test indicator is added to "configured" tab, before pressing OK , the following state changes are accessed.:
    SetDefaults
    3) When OK is pressed the following occurs:
    Terminated
    SetDefaults again.
    Configure
    DataLoaded.

    Please explain. Sorry in case it is described in help. Thanks.
    Last edited by xTrader1; 06-13-2017, 04:49 AM.

    #2
    Hello xTrader1,

    Thanks for opening the thread.

    I think what you would be looking for is described in the Understanding the lifecycle of your NinjaScript objects help documentation. It has a graphic flowchart describing how OnStateChange() goes through different its different states.

    You can find that section here: http://ninjatrader.com/support/helpG...fecycle_of.htm

    If you have any additional questions, please don't hesitate to ask.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thank you, it seems that's exactly what I experienced.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by cre8able, Today, 01:01 PM
      0 responses
      2 views
      0 likes
      Last Post cre8able  
      Started by manitshah915, Today, 12:59 PM
      0 responses
      2 views
      0 likes
      Last Post manitshah915  
      Started by ursavent, Today, 12:54 PM
      0 responses
      3 views
      0 likes
      Last Post ursavent  
      Started by Mizzouman1, Today, 07:35 AM
      3 responses
      17 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by RubenCazorla, Today, 09:07 AM
      2 responses
      13 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X