I´m having error messages ref. onbarupdate when using volumetric dataseries and I cant find the reason. I have
NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe barsType = BarsArray[2].BarsType as NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe;
if (barsType == null) return;
NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe barsType2 = BarsArray[4].BarsType as NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe;
if (barsType2 == null) return;
and I use it eg
if(barsType2.Volumes[CurrentBars[4]].GetAskVolumeForPrice(Highs[4][0])>barsType.Volumes[CurrentBars[2]].GetAskVolumeForPrice(Highs[2][0]))
and
if(barsType.Volumes[CurrentBars[2]].GetBidVolumeForPrice(Highs[2][0])==0)
and when accessing bars ago
if(barsType2.Volumes[CurrentBars[4]-1].GetAskVolumeForPrice(Highs[4][1])>.....)
Is there any syntax wrong please? I cant find from helpguide what would be wrong here.
Thank you!
Tony
Comment