Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Determine if an Instrument has Market Data Available
Collapse
X
-
Determine if an Instrument has Market Data Available
How can I determine if market data is available for a given instrument? Currently I create a MarketData object and wait for a fixed amount of time for it to call the update method. If this method doesn't get called then market data is unavailable.Tags: None
-
Hello ntbone,
Thank you for your post.
We checked with our dev team on this one, and while it's undocumented, so it is subject to change, you can try checking Instrument.HasSeenMarketData to see if it's gotten at least some real time market data. If the connection gets disconnected, well we don't know if its currently getting data, but we know it did at one point from checking this.
You may also want to check the following to determine if there may have been a disconnection:
if(myInstrument.MarketData.Last != null && !myInstrument.MarketData.Last.IsReset)
{
// do something if it has not been reset and there's been last data
}
Checking the connection or account might confirm if the connection was changed as well.
Please let us know if we may be of further assistance to you.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
92 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
138 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
68 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
122 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
73 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment