if(BarsPeriod.Id == PeriodType.Minute)
slopescale=Math.Pow(390/BarsPeriod.Value,.5);
else slopescale=Math.Pow(1/BarsPeriod.Value,.5);
If the else condition is triggered and the BarsPeriod.Value is anything besides one, my slopescale value is returned as zero.
I'm not a C# coder, so it might be something obvious that I'm missing.
Comment