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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
155 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
90 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
137 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
130 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
107 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment