Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Level 1 & 2 Data
Collapse
X
-
-
Hello GKonheiser,
Thanks for opening the thread.
OnMarketDepth() is guaranteed to provide level 2 data in the correct sequence for every change of level 2 data.
OnMarketData() is guaranteed to be in the correct sequence for every change in level 1 data.
For all changes in level 1 data, I would suggest to use OnMarketData(). Further reading can be found below:
OnMarketData() - https://ninjatrader.com/support/help...marketdata.htm
OnMarketDepth() - https://ninjatrader.com/support/help...arketdepth.htm
Please let me know if I may be of further assistance.
-
Hi Jim,
Thanks for the reply, if level 2 data include the most the bid and offer at position 0 , ie the current best bid and offer why would this not be identical to level 1 data ?
Comment
-
Hello GKonheiser,
Thanks for the additional question.
The bigger difference between the two methods lies in the MarketDataEventArgs and MarketDepthEventArgs. OnMarketData() which is used for outputting level 1 data has the following MarketDataType's:
OnMarketDepth() which is used for outputting level 2 data only has bid and ask available and provides other functionality to build a level 2 book.MarketDataType.Ask
MarketDataType.Bid
MarketDataType.DailyHigh
MarketDataType.DailyLow
MarketDataType.DailyVolume
MarketDataType.Last
MarketDataType.LastClose (prior session close)
MarketDataType.Opening
MarketDataType.OpenInterest (supported by IQFeed, Kinetick)
MarketDataType.Settlement
As these methods are called asynchronously and provide different output, you will not see identical Bid and Ask prices passing through these methods. This is where it would be advised to use OnMarketData() for level 1 purposes over the Bid/Ask in OnMarketDepth().MarketDataType.Ask
MarketDataType.Bid
If you have any additional questions, please don't hesitate to ask.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
89 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
135 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
119 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
69 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment