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:
for (double rowPrice = Low[0]; rowPrice <= High[0]; rowPrice += TickSize)
for (double rowPrice = High[0]; rowPrice >= Low[0]; rowPrice -= TickSize)
Looping through price levels of a bar to get the bottom 2 price levels, from low to high:
for (double rowPrice = Low[0]; rowPrice <= Low[0] + TickSize; rowPrice += TickSize)
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.
Comment