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 clarocque1, Today, 06:18 PM
      0 responses
      4 views
      0 likes
      Last Post clarocque1  
      Started by clarocque1, Today, 06:17 PM
      0 responses
      4 views
      0 likes
      Last Post clarocque1  
      Started by clarocque1, 03-23-2025, 08:17 AM
      4 responses
      27 views
      0 likes
      Last Post clarocque1  
      Started by Artorias, Today, 05:22 PM
      0 responses
      9 views
      0 likes
      Last Post Artorias  
      Started by several, Today, 07:07 AM
      8 responses
      26 views
      0 likes
      Last Post several
      by several
       
      Working...
      X