You can loop through the price levels of the bar by tick size to get the highest and lowest price levels of the bar, then you can use VolumetricBars' GetAskVolumeForPrice and GetBidVolumeForPrice to get the bid/ask volume of those price levels.
Looping through price levels of a bar, from low to high:
Code:
for (double rowPrice = Low[0]; rowPrice <= High[0]; rowPrice += TickSize)
Looping through price levels of a bar, from high to low:
Code:
for (double rowPrice = High[0]; rowPrice >= Low[0]; rowPrice -= TickSize)
You could limit the loop to check 2 price levels if you do the following:
Looping through price levels of a bar to get the bottom 2 price levels, from low to high:
Code:
for (double rowPrice = Low[0]; rowPrice <= Low[0] + TickSize; rowPrice += TickSize)
Volumetric Bars Data Access methods can be found here - [login to view URL]
As this thread was opened in our Platform Technical Support forum, we ask that if you have any other NinjaScript related questions, to open a thread in the NinjaScript Indicator Development or Strategy Development forums if you have additional NinjaScript questions.
Hello NinjaTrader Yes I m Freelancer Ninjatrader C++ . I m first bidder ask for send 2 messages to have good discuss project .
I can download Ninjatrader C++ platform and develop these simple codes as describes here project .My budget is only $50
Thanks . I ask for not award project until have all checks and complete