Exemple #1
0
 public static double Value(ISeries input, int index, int length, int order)
 {
     if (index >= length + order - 1)
     {
         double num = 0.0;
         for (int i = index; i > index - order; i--)
         {
             num += K_Fast.Value(input, i, length);
         }
         return(num / (double)order);
     }
     return(double.NaN);
 }
Exemple #2
0
        protected internal override void Calculate(int index)
        {
            if (this.calculate)
            {
                this.Calculate();
                return;
            }
            double num = K_Fast.Value(this.input, index, this.length);

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