Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Volumetric Bar info
Collapse
X
-
Volumetric Bar info
Hello, i need to develop an indicator who draw an arrow when in an up bar there is at least 2 levels with 0 contract size in the volumetric bar (obviusly excluding the top and the bottom of the bar) i've already read the volumetric info for develop with it but i didn't found what i needed
Tags: None
-
Hello CIFil,
Thank you for your note.
You can use GetAskVolumeForPrice and GetBidVolumeForPrice to get the Ask and Bid volume for each level. However, this would require you to check for each price level in the bar, and you would need to create your own logic for that.
Please let us know if we may be of further assistance to you.
- Likes 1
-
Hello ClFil,
Thanks for your post.
You will want to use the Volumetric Bars data access methods for this purpose:
You would then want to loop through each price level in a bar and then use that price to reference GetTotalVolumeForPrice or GetAskVolumeForPrice/GetBidVolumeForPrice from the Volumetric Bars data access methods.
Below is an example of a loop that will go over the price levels in a bar.
We look forward to assisting.Code:for (double price = Low[0]; price <=High[0]; price += TickSize) { }
- Likes 1
Comment
-
Thanks NinjaTrader_Kate I am trying to run a loop not from Low to High but from the POC in a bar to price levels above and below it to calculate the value area. Like start with POC and 2 levels above it and 2 levels below it and the 3 with most volume including the POC becomes the VA. Then add 2 more levels at top and bottom to the 3 and which one is more becomes VA as long as we still below the 70% threshold. And you repeat the loop till you reach 70%. Just FYI as I am trying to resolve it in another thread. Weird as my levels plotted match up to NT8 levels in a bar for value area for about 70% and yet both are wrong when I add them up manually randomly.Originally posted by NinjaTrader_Kate View PostHello CIFil,
Thank you for your note.
You can use GetAskVolumeForPrice and GetBidVolumeForPrice to get the Ask and Bid volume for each level. However, this would require you to check for each price level in the bar, and you would need to create your own logic for that.
Please let us know if we may be of further assistance to you.
Comment
-
Hello Trader17,
We would not be able to assist with a custom calculation. Our Order Flow Volume Profile indicator is closed source (proprietary) so we would not be able to share any hints for how it's calculation is made. Our support staff does not have source code to this indicator either.
Some things to keep in mind:
1. Value area consists of volume at specific price levels that make up the X% of total volume. You can end up with a Value Area of 68% actually taking up >68%. See the attached screenshot, where Value Area is actually 71.5% when 68% was used. You may tally up the Value Area where it is 131. Total volume for the bar is 183.
2. Value Area could be calculated a few different ways, and you might get some variance on where that Value Area forms between different studies.
You are welcome to use your own calculations if you like, but we need to be mindful that if you calculate something different in your study, it does not necessarily mean there is an issue with NinjaTrader.
Comment
-
Thanks NinjaTrader_Jim I understand fully well what are you showing me. My issue is when it falls short of reaching the 70% threshold in the value area. Have sent NinjaTrader_BrandonH several examples of this discrepancy in the closed script. Am attaching one for you too as you will see the value area has not reached the 70% threshold I used. Will it ever be exposed to NinjaScript in the future?Originally posted by NinjaTrader_Jim View PostHello Trader17,
We would not be able to assist with a custom calculation. Our Order Flow Volume Profile indicator is closed source (proprietary) so we would not be able to share any hints for how it's calculation is made. Our support staff does not have source code to this indicator either.
Some things to keep in mind:
1. Value area consists of volume at specific price levels that make up the X% of total volume. You can end up with a Value Area of 68% actually taking up >68%. See the attached screenshot, where Value Area is actually 71.5% when 68% was used. You may tally up the Value Area where it is 131. Total volume for the bar is 183.
2. Value Area could be calculated a few different ways, and you might get some variance on where that Value Area forms between different studies.
You are welcome to use your own calculations if you like, but we need to be mindful that if you calculate something different in your study, it does not necessarily mean there is an issue with NinjaTrader.
Thanks a lot for all your help.
Comment
-
Hello Trader17,
You mean to point out that the total for the Value Area is 20, when total volume is 31 for the bar?
I haven't seen this specifically, but it could very well come up if Order Flow Volume Profile is not using Tick Resolution.
Could you share screenshots of the settings you used for Data Series and the indicator? Please also share more detail on the bar that you are viewing (Instrument, time + timezone)
You are using NinjaTrader Continuum for data correct?
Comment
-
Thanks NinjaTrader_Jim for the prompt reply. I am using NinjaTrader Continuum Data. Just testing randomly on a 5 range ES for now. I am attaching a screenshot from a few minutes ago. Sometimes it prints the VAH or VAL above/below the High/Low of the bar. One example should be greater than 22.4 but drew at 22 itself and so on. I am using a 70% setting in the indicator. I am using Tick Resolution too.Originally posted by NinjaTrader_Jim View PostHello Trader17,
You mean to point out that the total for the Value Area is 20, when total volume is 31 for the bar?
I haven't seen this specifically, but it could very well come up if Order Flow Volume Profile is not using Tick Resolution.
Could you share screenshots of the settings you used for Data Series and the indicator? Please also share more detail on the bar that you are viewing (Instrument, time + timezone)
You are using NinjaTrader Continuum for data correct?
Maybe NinjaTrader_Jim try to plot the value area total volume and 70% of the bar's volume below each bar to see it quickly. Maybe a feature request in the future?Last edited by Trader17; 03-17-2022, 02:40 PM.
Comment
-
NinjaTrader_Jim here is an example where it is totally off the bar. I am using "ticks" in the setting.
Comment
-
Hey NinjaTrader_Jim Here is the classic where it fails to meet the threshold. Prints the 70% at 47 even though it has to be at least 49.
Thanks.
Comment
-
Thanks Trader17,
The additional detail on Range bars helps to point out what you are looking at.
These are tick based bars which split when their range is exceeded, and since they are tick based bars, there can be ticks with the same timestamp.
This gets to a variance between BarsTypes and Indicators and how data is processed:
BarsTypes process data as the data is received to build bars.
When an indicator starts, it processes historical bars chronologically, and Order Flow Volume Profile uses a single tick data series to analyze volume. It does not use the Volumetric Bars data since it is built to be applied to non-Volumetric charts. If the ticks bars that OFVP analyzes come out of order, we can see profile levels appear outside of the bar.
When an indicator switches over to processing realtime data, the ticks are coming in chronological order and this Range bar discrepancy would not be seen.
With that in mind, the differences between Volumetric Bars and the Order Flow indicators boil down to BarsType/indicator differences.
You can see in my attached screenshot and yours that the "out of bar" value area is seen when there are multiple bars with the same timestamp.
This limitation would also affect Value Area's calculation, because one tick may be processed in Bar 1 by the BarsType, but the indicator may process that tick in Bar 2.
This affects tick based bars (Range, Tick, Volume, etc.) but the differences are really only going to be noticeable with small tick based bars, when processing historical data, when comparing the indicator and BarsType.
I went into detail regarding these differences in the thread below. (video and test script included.)
https://ninjatrader.com/support/foru...elta-indicator
Making changes to address this limitation involve deep core changes to sensitive parts of the platform. I've tracked your interest to have this changed, but for now we are not making immediate changes and just tracking impact. The ticket ID requesting improvement in this area is SFT-3215.Last edited by NinjaTrader_Jim; 03-17-2022, 03:39 PM.
- Likes 1
Comment
-
Thanks NinjaTrader_Jim for the details. If I understand you correctly, you said best way to use volumetric bars even in smaller tick frames for real time and historical accuracy. All my examples were on range based volumetric bars and we still saw the discrepancies on them. They were about 5 range which I feel is not too small of a time frame even though it does have some bars sometimes with the same time stamp.
Thanks a lot!!
Comment
-
Hello Trader17,
Correct. Volumetric bar derived calculations would not exhibit this discrepancy, but an indicator that uses a single tick data series for analysis would. (Order Flow indicators use a single tick data series for volume analysis.)If I understand you correctly, you said best way to use volumetric bars even in smaller tick frames for real time and historical accuracy
As you can see in your charts and mine, 5 Range can be enough to make the "ticks with same timestamp" discrepancy noticeable in historical tick based bars. This gets less noticeable when the size of the tick based bar increases.All my examples were on range based volumetric bars and we still saw the discrepancies on them. They were about 5 range which I feel is not too small of a time frame even though it does have some bars sometimes with the same time stamp.
Comment
-
Thanks NinjaTrader_Jim so regardless of the Bar Type we will still find these discrepancies? I thought I heard you say on the video that even in smaller time frames using volumetric bars will eliminate the errors. My bad. So there is no way to align the volumetric bars with a one tick series indicator efficiently in NT8?Originally posted by NinjaTrader_Jim View PostHello Trader17,
Correct. Volumetric bar derived calculations would not exhibit this discrepancy, but an indicator that uses a single tick data series for analysis would. (Order Flow indicators use a single tick data series for volume analysis.)
As you can see in your charts and mine, 5 Range can be enough to make the "ticks with same timestamp" discrepancy noticeable in historical tick based bars. This gets less noticeable when the size of the tick based bar increases.
Another question NinjaTrader_Jim on the OFVP indicator even though it is set to calculate on bar close with a tick resolution why is it updating the VAH and VAL during the bar forming? I feel that may use up a lot of resources. It is not necessary either. Could you make that a feature enhancement maybe?
And BTW NinjaTrader_Jim you and your team ROCK!! Always coming back with answers very quickly and in detail! NinjaTrader_Kate is a great example!!
Comment
-
The discrepancy is relevant to indicators that process a single tick data series for analysis (calculations using Volumetric Bar methods would not show the discrepancy, but using a single tick data series for volume analysis would show the discrepancy.)
The discrepancy specifically affects: 1. indicators that use a single tick data series to study volume, 2. on tick based bars, 3. when processing historical data. It is more noticeable with tick bars with a small size, and it is less noticeable as the size of the tick based bar increases.
I understand with Volume Profile that since it is using the single tick data series, the profile would already include the developing values.
Development may have been determined that having the Value Area also calculated was not taxing enough to consider only calculating Value Area when a bar closes. I'm not sure, but I am asking Quality Assurance and Development if there was any explicit reasoning to for the behavior we currently see.
I should hear back sometime next week.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
656 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
371 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 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
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
579 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment