on the language reference it says that bid/ask volumes are not available in historical tick replay but if i print the volumetric bars ask/bid volume at a price it appears to print numbers
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Orderflow bid/ask volume at price in historical
Collapse
X
-
Orderflow bid/ask volume at price in historical
i see that orderflow bid/ask volumes at a price for the 5 min bar prints numbers with tick replay enabled. Are those number accurate? if not how are they calculated?
on the language reference it says that bid/ask volumes are not available in historical tick replay but if i print the volumetric bars ask/bid volume at a price it appears to print numbers -
Hello Pole123,
Thank you for your post.
Here is the main note in the help guide about Tick Replay and historical bid/ask market data (such as volume):- "Tick Replay ONLY replays the Last market data event, and only stores the best inside bid/ask price at the time of the last trade event. You can think of this as the equivalent of the bid/ask price at the time a trade was reported. As such, historical bid/ask market data events (i..e, bid/ask volume) DO NOT work with Tick Replay. To obtain those values, you need to use a historical bid/ask series separately from Tick Replay through OnBarUpdate()"
Please let us know if we may be of further assistance.Emily C.NinjaTrader Customer Service
-
So yes I see a difference between the realtime and historical order flow data series for GetAskVolumeForPrice() and GetBidVolumeForPrice() from the Volumetric Bars. How could I get the historical behaviour in the realtime market?
while e BuySellVolume indicator seems consistent between realtime and historical
Code:protected override void OnMarketData(MarketDataEventArgs e) { if(e.MarketDataType == MarketDataType.Last) { if(e.Price >= e.Ask) { if (AskMap.ContainsKey(e.Price)) AskMap[e.Price] += e.Volume; else AskMap.Add(e.Price, e.Volume); } else if (e.Price <= e.Bid) { if (BidMap.ContainsKey(e.Price)) BidMap[e.Price] += e.Volume; else BidMap.Add(e.Price, e.Volume); } } } protected override void OnBarUpdate() { if (BarsInProgress==0 && CurrentBars[0]>1) { if (IsFirstTickOfBar || Calculate == Calculate.OnBarClose) { AskMap.Clear(); BidMap.Clear(); AskMap.Add(Opens[0][0], 0); BidMap.Add(Opens[0][0], 0); } } }
And here the output of the Volumetric GetAskVolumeForPrice VS my indicator:
Code:NT8 ASK: 40 INDI ASK: 71 AT PRICE: 14487.5 | 10/25/2023 3:29:45 PM NT8 ASK: 40 INDI ASK: 72 AT PRICE: 14487.5 | 10/25/2023 3:29:45 PM NT8 ASK: 36 INDI ASK: 59 AT PRICE: 14487.75 | 10/25/2023 3:29:45 PM NT8 ASK: 36 INDI ASK: 60 AT PRICE: 14487.75 | 10/25/2023 3:29:45 PM NT8 ASK: 36 INDI ASK: 61 AT PRICE: 14487.75 | 10/25/2023 3:29:45 PM NT8 ASK: 36 INDI ASK: 64 AT PRICE: 14487.75 | 10/25/2023 3:29:45 PM NT8 ASK: 36 INDI ASK: 65 AT PRICE: 14487.75 | 10/25/2023 3:29:45 PM NT8 ASK: 25 INDI ASK: 29 AT PRICE: 14488 | 10/25/2023 3:29:45 PM NT8 ASK: 25 INDI ASK: 30 AT PRICE: 14488 | 10/25/2023 3:29:45 PM NT8 ASK: 19 INDI ASK: 35 AT PRICE: 14488.25 | 10/25/2023 3:29:45 PM NT8 ASK: 29 INDI ASK: 50 AT PRICE: 14487.25 | 10/25/2023 3:29:46 PM NT8 ASK: 29 INDI ASK: 50 AT PRICE: 14487.25 | 10/25/2023 3:29:46 PM NT8 ASK: 29 INDI ASK: 50 AT PRICE: 14487.25 | 10/25/2023 3:29:46 PM NT8 ASK: 29 INDI ASK: 50 AT PRICE: 14487.25 | 10/25/2023 3:29:46 PM NT8 ASK: 29 INDI ASK: 50 AT PRICE: 14487.25 | 10/25/2023 3:29:46 PM NT8 ASK: 44 INDI ASK: 72 AT PRICE: 14487 | 10/25/2023 3:29:46 PM NT8 ASK: 44 INDI ASK: 72 AT PRICE: 14487 | 10/25/2023 3:29:46 PM NT8 ASK: 53 INDI ASK: 50 AT PRICE: 14486.5 | 10/25/2023 3:29:46 PM NT8 ASK: 54 INDI ASK: 45 AT PRICE: 14486.25 | 10/25/2023 3:29:46 PM NT8 ASK: 54 INDI ASK: 45 AT PRICE: 14486.25 | 10/25/2023 3:29:46 PM NT8 ASK: 54 INDI ASK: 45 AT PRICE: 14486.25 | 10/25/2023 3:29:46 PM NT8 ASK: 54 INDI ASK: 45 AT PRICE: 14486.25 | 10/25/2023 3:29:46 PM NT8 ASK: 53 INDI ASK: 50 AT PRICE: 14486.5 | 10/25/2023 3:29:46 PM NT8 ASK: 54 INDI ASK: 46 AT PRICE: 14486.25 | 10/25/2023 3:29:46 PM NT8 ASK: 46 INDI ASK: 39 AT PRICE: 14486.75 | 10/25/2023 3:29:46 PM NT8 ASK: 53 INDI ASK: 50 AT PRICE: 14486.5 | 10/25/2023 3:29:46 PM NT8 ASK: 54 INDI ASK: 46 AT PRICE: 14486.25 | 10/25/2023 3:29:46 PM NT8 ASK: 54 INDI ASK: 46 AT PRICE: 14486.25 | 10/25/2023 3:29:46 PM NT8 ASK: 54 INDI ASK: 46 AT PRICE: 14486.25 | 10/25/2023 3:29:47 PM NT8 ASK: 51 INDI ASK: 80 AT PRICE: 14486 | 10/25/2023 3:29:47 PM NT8 ASK: 51 INDI ASK: 80 AT PRICE: 14486 | 10/25/2023 3:29:47 PM NT8 ASK: 51 INDI ASK: 80 AT PRICE: 14486 | 10/25/2023 3:29:47 PM NT8 ASK: 54 INDI ASK: 47 AT PRICE: 14486.25 | 10/25/2023 3:29:47 PM NT8 ASK: 51 INDI ASK: 80 AT PRICE: 14486 | 10/25/2023 3:29:47 PM NT8 ASK: 51 INDI ASK: 80 AT PRICE: 14486 | 10/25/2023 3:29:47 PM NT8 ASK: 51 INDI ASK: 81 AT PRICE: 14486 | 10/25/2023 3:29:47 PM NT8 ASK: 53 INDI ASK: 52 AT PRICE: 14486.5 | 10/25/2023 3:29:47 PM NT8 ASK: 53 INDI ASK: 53 AT PRICE: 14486.5 | 10/25/2023 3:29:47 PM NT8 ASK: 53 INDI ASK: 56 AT PRICE: 14486.5 | 10/25/2023 3:29:47 PM NT8 ASK: 53 INDI ASK: 57 AT PRICE: 14486.5 | 10/25/2023 3:29:47 PM NT8 ASK: 53 INDI ASK: 59 AT PRICE: 14486.5 | 10/25/2023 3:29:47 PM NT8 ASK: 46 INDI ASK: 41 AT PRICE: 14486.75 | 10/25/2023 3:29:47 PM NT8 ASK: 46 INDI ASK: 42 AT PRICE: 14486.75 | 10/25/2023 3:29:47 PM NT8 ASK: 53 INDI ASK: 60 AT PRICE: 14486.5 | 10/25/2023 3:29:47 PM NT8 ASK: 53 INDI ASK: 60 AT PRICE: 14486.5 | 10/25/2023 3:29:47 PM NT8 ASK: 46 INDI ASK: 45 AT PRICE: 14486.75 | 10/25/2023 3:29:47 PM NT8 ASK: 46 INDI ASK: 46 AT PRICE: 14486.75 | 10/25/2023 3:29:47 PM NT8 ASK: 46 INDI ASK: 47 AT PRICE: 14486.75 | 10/25/2023 3:29:47 PM NT8 ASK: 53 INDI ASK: 61 AT PRICE: 14486.5 | 10/25/2023 3:29:47 PM NT8 ASK: 53 INDI ASK: 62 AT PRICE: 14486.5 | 10/25/2023 3:29:47 PM NT8 ASK: 46 INDI ASK: 49 AT PRICE: 14486.75 | 10/25/2023 3:29:48 PM NT8 ASK: 53 INDI ASK: 62 AT PRICE: 14486.5 | 10/25/2023 3:29:48 PM NT8 ASK: 54 INDI ASK: 48 AT PRICE: 14486.25 | 10/25/2023 3:29:48 PM NT8 ASK: 54 INDI ASK: 48 AT PRICE: 14486.25 | 10/25/2023 3:29:48 PM NT8 ASK: 54 INDI ASK: 48 AT PRICE: 14486.25 | 10/25/2023 3:29:48 PM NT8 ASK: 54 INDI ASK: 48 AT PRICE: 14486.25 | 10/25/2023 3:29:48 PM NT8 ASK: 54 INDI ASK: 48 AT PRICE: 14486.25 | 10/25/2023 3:29:48 PM NT8 ASK: 51 INDI ASK: 82 AT PRICE: 14486 | 10/25/2023 3:29:48 PM NT8 ASK: 46 INDI ASK: 53 AT PRICE: 14486.75 | 10/25/2023 3:29:48 PM NT8 ASK: 46 INDI ASK: 54 AT PRICE: 14486.75 | 10/25/2023 3:29:48 PM NT8 ASK: 46 INDI ASK: 55 AT PRICE: 14486.75 | 10/25/2023 3:29:48 PM NT8 ASK: 44 INDI ASK: 73 AT PRICE: 14487 | 10/25/2023 3:29:48 PM NT8 ASK: 53 INDI ASK: 62 AT PRICE: 14486.5 | 10/25/2023 3:29:49 PM NT8 ASK: 54 INDI ASK: 48 AT PRICE: 14486.25 | 10/25/2023 3:29:49 PM NT8 ASK: 54 INDI ASK: 48 AT PRICE: 14486.25 | 10/25/2023 3:29:49 PM NT8 ASK: 54 INDI ASK: 48 AT PRICE: 14486.25 | 10/25/2023 3:29:49 PM NT8 ASK: 54 INDI ASK: 48 AT PRICE: 14486.25 | 10/25/2023 3:29:49 PM NT8 ASK: 46 INDI ASK: 57 AT PRICE: 14486.75 | 10/25/2023 3:29:49 PM NT8 ASK: 46 INDI ASK: 60 AT PRICE: 14486.75 | 10/25/2023 3:29:49 PM NT8 ASK: 46 INDI ASK: 61 AT PRICE: 14486.75 | 10/25/2023 3:29:49 PM NT8 ASK: 44 INDI ASK: 75 AT PRICE: 14487 | 10/25/2023 3:29:49 PM NT8 ASK: 44 INDI ASK: 77 AT PRICE: 14487 | 10/25/2023 3:29:49 PM NT8 ASK: 54 INDI ASK: 49 AT PRICE: 14486.25 | 10/25/2023 3:29:49 PM NT8 ASK: 53 INDI ASK: 64 AT PRICE: 14486.5 | 10/25/2023 3:29:49 PM NT8 ASK: 53 INDI ASK: 65 AT PRICE: 14486.5 | 10/25/2023 3:29:49 PM NT8 ASK: 54 INDI ASK: 50 AT PRICE: 14486.25 | 10/25/2023 3:29:50 PM NT8 ASK: 51 INDI ASK: 82 AT PRICE: 14486 | 10/25/2023 3:29:50 PM NT8 ASK: 30 INDI ASK: 54 AT PRICE: 14485.5 | 10/25/2023 3:29:50 PM NT8 ASK: 45 INDI ASK: 90 AT PRICE: 14485.25 | 10/25/2023 3:29:50 PM NT8 ASK: 45 INDI ASK: 90 AT PRICE: 14485.25 | 10/25/2023 3:29:50 PM NT8 ASK: 30 INDI ASK: 55 AT PRICE: 14485.5 | 10/25/2023 3:29:50 PM NT8 ASK: 30 INDI ASK: 58 AT PRICE: 14485.5 | 10/25/2023 3:29:50 PM NT8 ASK: 30 INDI ASK: 59 AT PRICE: 14485.5 | 10/25/2023 3:29:50 PM NT8 ASK: 38 INDI ASK: 68 AT PRICE: 14485.75 | 10/25/2023 3:29:50 PM NT8 ASK: 38 INDI ASK: 72 AT PRICE: 14485.75 | 10/25/2023 3:29:50 PM NT8 ASK: 38 INDI ASK: 73 AT PRICE: 14485.75 | 10/25/2023 3:29:50 PM NT8 ASK: 38 INDI ASK: 74 AT PRICE: 14485.75 | 10/25/2023 3:29:50 PM NT8 ASK: 38 INDI ASK: 75 AT PRICE: 14485.75 | 10/25/2023 3:29:50 PM NT8 ASK: 38 INDI ASK: 76 AT PRICE: 14485.75 | 10/25/2023 3:29:50 PM NT8 ASK: 51 INDI ASK: 86 AT PRICE: 14486 | 10/25/2023 3:29:50 PM NT8 ASK: 51 INDI ASK: 87 AT PRICE: 14486 | 10/25/2023 3:29:50 PM NT8 ASK: 51 INDI ASK: 88 AT PRICE: 14486 | 10/25/2023 3:29:50 PM NT8 ASK: 51 INDI ASK: 89 AT PRICE: 14486 | 10/25/2023 3:29:50 PM NT8 ASK: 54 INDI ASK: 50 AT PRICE: 14486.25 | 10/25/2023 3:29:50 PM NT8 ASK: 54 INDI ASK: 50 AT PRICE: 14486.25 | 10/25/2023 3:29:50 PM NT8 ASK: 54 INDI ASK: 50 AT PRICE: 14486.25 | 10/25/2023 3:29:50 PM NT8 ASK: 54 INDI ASK: 51 AT PRICE: 14486.25 | 10/25/2023 3:29:50 PM NT8 ASK: 53 INDI ASK: 67 AT PRICE: 14486.5 | 10/25/2023 3:29:50 PM NT8 ASK: 51 INDI ASK: 90 AT PRICE: 14486 | 10/25/2023 3:29:51 PM NT8 ASK: 54 INDI ASK: 54 AT PRICE: 14486.25 | 10/25/2023 3:29:51 PM NT8 ASK: 46 INDI ASK: 63 AT PRICE: 14486.75 | 10/25/2023 3:29:51 PM NT8 ASK: 53 INDI ASK: 70 AT PRICE: 14486.5 | 10/25/2023 3:29:51 PM NT8 ASK: 53 INDI ASK: 71 AT PRICE: 14486.5 | 10/25/2023 3:29:51 PM NT8 ASK: 46 INDI ASK: 65 AT PRICE: 14486.75 | 10/25/2023 3:29:51 PM NT8 ASK: 54 INDI ASK: 56 AT PRICE: 14486.25 | 10/25/2023 3:29:51 PM NT8 ASK: 53 INDI ASK: 74 AT PRICE: 14486.5 | 10/25/2023 3:29:51 PM NT8 ASK: 53 INDI ASK: 75 AT PRICE: 14486.5 | 10/25/2023 3:29:51 PM NT8 ASK: 51 INDI ASK: 90 AT PRICE: 14486 | 10/25/2023 3:29:51 PM NT8 ASK: 51 INDI ASK: 90 AT PRICE: 14486 | 10/25/2023 3:29:51 PM NT8 ASK: 51 INDI ASK: 93 AT PRICE: 14486 | 10/25/2023 3:29:52 PM NT8 ASK: 51 INDI ASK: 94 AT PRICE: 14486 | 10/25/2023 3:29:52 PM NT8 ASK: 51 INDI ASK: 95 AT PRICE: 14486 | 10/25/2023 3:29:52 PM NT8 ASK: 51 INDI ASK: 97 AT PRICE: 14486 | 10/25/2023 3:29:52 PM NT8 ASK: 54 INDI ASK: 62 AT PRICE: 14486.25 | 10/25/2023 3:29:52 PM NT8 ASK: 54 INDI ASK: 63 AT PRICE: 14486.25 | 10/25/2023 3:29:52 PM NT8 ASK: 54 INDI ASK: 64 AT PRICE: 14486.25 | 10/25/2023 3:29:52 PM NT8 ASK: 54 INDI ASK: 65 AT PRICE: 14486.25 | 10/25/2023 3:29:52 PM NT8 ASK: 54 INDI ASK: 66 AT PRICE: 14486.25 | 10/25/2023 3:29:52 PM NT8 ASK: 54 INDI ASK: 67 AT PRICE: 14486.25 | 10/25/2023 3:29:52 PM NT8 ASK: 51 INDI ASK: 98 AT PRICE: 14486 | 10/25/2023 3:29:52 PM NT8 ASK: 53 INDI ASK: 77 AT PRICE: 14486.5 | 10/25/2023 3:29:52 PM NT8 ASK: 46 INDI ASK: 67 AT PRICE: 14486.75 | 10/25/2023 3:29:53 PM NT8 ASK: 54 INDI ASK: 69 AT PRICE: 14486.25 | 10/25/2023 3:29:53 PM NT8 ASK: 51 INDI ASK: 98 AT PRICE: 14486 | 10/25/2023 3:29:53 PM NT8 ASK: 53 INDI ASK: 79 AT PRICE: 14486.5 | 10/25/2023 3:29:53 PM NT8 ASK: 53 INDI ASK: 81 AT PRICE: 14486.5 | 10/25/2023 3:29:54 PM NT8 ASK: 46 INDI ASK: 69 AT PRICE: 14486.75 | 10/25/2023 3:29:54 PM NT8 ASK: 51 INDI ASK: 98 AT PRICE: 14486 | 10/25/2023 3:29:54 PM NT8 ASK: 54 INDI ASK: 72 AT PRICE: 14486.25 | 10/25/2023 3:29:54 PM
Last edited by Pole123; 10-25-2023, 01:35 PM.
Comment
-
Hello Pole123,
Thank you for your reply.
Getting the bid and ask volume from inside of a bar has been discussed in the following thread, which includes an example that makes dictionaries to track bid/ask volume for each bar:
Hello everyone I am trying to get the bid ask volume inside the bar from the example the problem is that I need a method to get the bid and ask volume without tick replay. I am trying to create this indicator on my own - from the example of the developers But the result is without successfully Below is my code I ask for
Please let us know if we may be of further assistance.Emily C.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by gustavobp, Today, 03:15 AM
|
0 responses
5 views
0 likes
|
Last Post
![]()
by gustavobp
Today, 03:15 AM
|
||
Started by gustavobp, Today, 03:00 AM
|
0 responses
5 views
0 likes
|
Last Post
![]()
by gustavobp
Today, 03:00 AM
|
||
Started by nicbizz, Today, 02:14 AM
|
0 responses
5 views
0 likes
|
Last Post
![]()
by nicbizz
Today, 02:14 AM
|
||
Started by Ringer13, Today, 01:59 AM
|
0 responses
7 views
0 likes
|
Last Post
![]()
by Ringer13
Today, 01:59 AM
|
||
Started by NINZAMANA, 02-06-2025, 09:03 AM
|
2 responses
24 views
0 likes
|
Last Post
![]()
by Fertryd2
Today, 01:51 AM
|
Comment