Exemplo n.º 1
0
 public static double Value(ISeries input, int index, int length, BarData barData = BarData.Close, RegressionDistanceMode distanceMode = RegressionDistanceMode.Time)
 {
     if (index >= length - 1)
     {
         double num  = input[index, barData];
         double num2 = LRI.Value(input, index, length, barData, distanceMode);
         return(100.0 * (num - num2) / num2);
     }
     return(double.NaN);
 }
Exemplo n.º 2
0
        protected internal override void Calculate(int index)
        {
            if (this.calculate)
            {
                this.Calculate();
                return;
            }
            double num = LRI.Value(this.input, index, this.length, this.barData, this.distanceMode);

            if (!double.IsNaN(num))
            {
                base.Add(this.input.GetDateTime(index), num);
            }
        }