Indicator 'RatioEficiencia': Error on calling 'OnCalculateMinMax' method on bar 0: The calculation results in unrenderable values.
and the indicator don't plot anything. Could you help me, please?
I attach the .cs file but the code is:
protected override void OnBarUpdate()
{
if (CurrentBar < Periodo)
return;
velocidad = Math.Abs(Input[0]-Input[Periodo]);
volatilidad = 0;
for (int i=0; i<Periodo; i++)
{
volatilidad += Math.Abs(Input[i]-Input[i+1]);
Print(i);
}
ratioEficiencia = velocidad / volatilidad;
Value[0] = ratioEficiencia;
MediaRatioEficiencia[0] = SMA(Value, Periodo)[0];
}
Thank you very much
Comment