public static double Value(ISeries input, int index, int length, int order1, int order2) { if (index >= length + order1 + order2 - 1) { double num = 0.0; for (int i = index; i > index - order2; i--) { num += K_Slow.Value(input, i, length, order1); } return(num / (double)order2); } return(double.NaN); }
protected internal override void Calculate(int index) { if (this.calculate) { this.Calculate(); return; } double num = K_Slow.Value(this.input, index, this.length, this.order); if (!double.IsNaN(num)) { base.Add(this.input.GetDateTime(index), num); } }