I'm trying to develop my first indicator, but I'm doing wrong something and i do not understand where is the problem
Basically when print out the value in order to check if is correct or not, i cannot see the decimal part of the division. (IB result) I can see just the integer value.
below my code
e
protected override void OnBarUpdate()
{
if (Bars == null)
return;
NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe barsType = Bars.BarsSeries.BarsType as
NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe;
if (barsType == null)
return;
try
{
IB[0]= ( barsType.Volumes[CurrentBar].Trades /barsType.Volumes[CurrentBar].TotalVolume );
Print("IB: " + barsType.Volumes[CurrentBar].GetDeltaPercent());
Print("Vol: " + (barsType.Volumes[CurrentBar].TotalVolume ));
Print("Trade: " + (barsType.Volumes[CurrentBar].Trades));
}
catch{}
}
Thx
Angelo
Comment