Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How things work?
Collapse
X
-
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:
-
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.Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, 03-12-2025, 07:41 PM
|
4 responses
43 views
0 likes
|
Last Post
![]()
by algospoke
Today, 07:31 PM
|
||
Started by clarocque1, Today, 06:18 PM
|
0 responses
5 views
0 likes
|
Last Post
![]()
by clarocque1
Today, 06:18 PM
|
||
Started by clarocque1, Today, 06:17 PM
|
0 responses
4 views
0 likes
|
Last Post
![]()
by clarocque1
Today, 06:17 PM
|
||
Started by clarocque1, 03-23-2025, 08:17 AM
|
4 responses
28 views
0 likes
|
Last Post
![]()
by clarocque1
Today, 05:31 PM
|
||
Started by Artorias, Today, 05:22 PM
|
0 responses
9 views
0 likes
|
Last Post
![]()
by Artorias
Today, 05:22 PM
|
Leave a comment: