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 Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
571 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
330 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
548 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
549 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment