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 Max238, Today, 01:28 AM
|
5 responses
39 views
0 likes
|
Last Post
by Max238
Today, 08:30 AM
|
||
Started by giulyko00, Yesterday, 12:03 PM
|
3 responses
12 views
0 likes
|
Last Post Today, 08:26 AM | ||
Started by habeebft, Today, 07:27 AM
|
1 response
14 views
0 likes
|
Last Post Today, 08:08 AM | ||
Hi
by AveryFlynn
Started by AveryFlynn, Today, 04:57 AM
|
1 response
12 views
0 likes
|
Last Post Today, 07:57 AM | ||
Started by r68cervera, Today, 05:29 AM
|
1 response
10 views
0 likes
|
Last Post Today, 07:47 AM |
Comment