DataSeries Close; //只在Close被修改时才会触发指标计算,以避免多个input造成指标计算多次的性能问题. protected override void Init() { Close = Input; dmMinus = new DataSeries(this.Input); dmPlus = new DataSeries(this.Input); tr = new DataSeries(this.Input); smaTr = SMA(tr, Period); smaDmMinus = SMA(dmMinus, Period); smaDmPlus = SMA(dmPlus, Period); }
protected override void Init() { Close = Input; den = new DataSeries(Input); nom = new DataSeries(Input); fastK = new DataSeries(Input); min = Lowest(Low, PeriodK); max = Highest(High, PeriodK); smaFastK = SMA(fastK, Smooth); smaK = SMA(K, PeriodD); }
protected override void Init() { constant1 = 2.0 / (1 + Smooth); constant2 = (1 - (2.0 / (1 + Smooth))); constant3 = (Period - 1); avgUp = new DataSeries(this.Input); avgDown = new DataSeries(this.Input); down = new DataSeries(this.Input); up = new DataSeries(this.Input); smaDown = SMA(down, Period); smaUp = SMA(up, Period); }
public override void Initialize() { ma1 = SMA(C, MA1); ma2 = SMA(C, MA2); }
DataSeries Close; //只在Close被修改时才会触发指标计算,以避免多个input造成指标计算多次的性能问题. protected override void Init() { Close = Input; bop = new DataSeries(this.Input); sma = SMA(bop, Smooth); }
protected override void Init() { stdDev = StdDev(this.Input, 5); sma = SMA(stdDev.Value, 10); }
/// <summary> /// /// </summary> protected override void Init() { NumStdDev = 2; sma = SMA(Input, Period); stdDev = StdDev(Input, Period); }
DataSeries Close; //只在Close被修改时才会触发指标计算,以避免多个input造成指标计算多次的性能问题. protected override void Init() { Close = Input; Typical = new DataSeries(this.Input); sma = SMA(Typical, Period); }