Does anyone know the order of processing of OnDataPoint() relative to OnStateChange()? The Guide states that the designed state management system for BarTypes is State.Active. So does OnDataPoint() take place after State.Configure and before State.Active, or after State.Active and before State.DataLoaded?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Order of Processing Of OnDataPoint()
Collapse
X
-
Order of Processing Of OnDataPoint()
Hi,
Does anyone know the order of processing of OnDataPoint() relative to OnStateChange()? The Guide states that the designed state management system for BarTypes is State.Active. So does OnDataPoint() take place after State.Configure and before State.Active, or after State.Active and before State.DataLoaded?Tags: None
-
Hello Zeos6,
Thank you for the post.
From testing a blank custom bar type, I find that the ordering is State.Configure, State.Active, then OnDataPoint begins to be called. I do not see a case where State.DataLoaded is reached, so State.DataLoaded is not considered in a custom bar type.
I have attached my test script. Please let me know if I can assist further.Attached FilesChris L.NinjaTrader Customer Service
-
Thank you ChrisL. That is helpful.
I do, however, have a follow up question. If State.DataLoaded is never reached, how are historical bars processed. State.Historical comes after State.DataLoaded? Does NT simply skip State.DataLoaded and moves directly into State.Historical, State.Transition, and then State.RealTime?
Comment
-
Hello Zeos6,
Thank you for the reply.
BarsTypes do not have the same lifecycle as indicators or strategies. State.Active is when the bar type is active and working. Note that the Active state is different than data processing states.
Please see this help guide page that describes OnStateChange states:
Please let me know if I can assist further.Chris L.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by geddyisodin, 04-25-2024, 05:20 AM
|
8 responses
60 views
0 likes
|
Last Post Yesterday, 10:45 AM | ||
Started by jxs_xrj, 01-12-2020, 09:49 AM
|
4 responses
3,287 views
1 like
|
Last Post
by jgualdronc
Today, 10:02 AM
|
||
Can someone turn this thinkscript into a ninjascript. 5PM CST OHL and Previous Day
by Option Whisperer
Started by Option Whisperer, Today, 09:55 AM
|
0 responses
5 views
0 likes
|
Last Post Today, 09:55 AM | ||
Started by halgo_boulder, 04-20-2024, 08:44 AM
|
2 responses
22 views
0 likes
|
Last Post Today, 09:41 AM | ||
Started by mishhh, 05-25-2010, 08:54 AM
|
19 responses
6,189 views
0 likes
|
Last Post
by rene69851
Today, 09:29 AM
|
Comment