Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Data in second workspace loads in realtime state.
Collapse
X
-
Data in second workspace loads in realtime state.
Data in a first workspace loads fine in Historical mode then switches to Realtime mode on the last data point. When I open a second workspace with the same instrument the chart data loads in that workspace in Realtime mode for all data populating the chart going back to the first data point up to the present. I need a way to distinguish when data is finished loading and is actually processing only real time incoming data. I thought of checking bar time vs. clock time and only processing if the bar time is within a millisecond or so clock time. Is there a more elegant way to handle this?Tags: None
-
Hello Vitamite,
Welcome to the NinjaTrader forums!
In the indicator you are developing, OnStateChange() will update at the moment that the State becomes State.Realtime.
In OnBarUpdate() you can print the time of the bar and the State property to see which bar is the first real-time bar.
Below I am also providing a link to a support article with helpful resources on getting started with NinjaScript and C# development.
Chelsea B.NinjaTrader Customer Service
-
Well this is what I am seeing. These were loaded about 15:30 or so 5/14/2024. The first file is the output window when I load the first workspace. When the second loads the state is "realtime" from line 4145 to the end.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
57 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
78 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
41 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
101 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
61 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment