public static double Value(TimeSeries input, int index, int length, double k, BarData option) { if (index >= length - 1 + input.FirstIndex) { return(SMA.Value(input, index, length, option) + k * SMD.Value(input, index, length, option)); } else { return(double.NaN); } }
public static double Value(DoubleSeries input, int index, int length) { return(SMD.Value((TimeSeries)input, index, length, BarData.Close)); }
protected override void Calculate(int index) { double Data = SMD.Value(this.fInput, index, this.fLength, this.fOption); this.Add(this.fInput.GetDateTime(index), Data); }