Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How things work?

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

  • xTrader1
    replied
    Thank you, it seems that's exactly what I experienced.

    Leave a comment:


  • NinjaTrader_Jim
    replied
    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.

    Leave a comment:


  • xTrader1
    started a topic How things work?

    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.

Latest Posts

Collapse

Topics Statistics Last Post
Started by algospoke, 03-12-2025, 07:41 PM
4 responses
43 views
0 likes
Last Post algospoke  
Started by clarocque1, Today, 06:18 PM
0 responses
5 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
28 views
0 likes
Last Post clarocque1  
Started by Artorias, Today, 05:22 PM
0 responses
9 views
0 likes
Last Post Artorias  
Working...
X