Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
 public override void Initialize()
 {
     ma1 = SMA(C, MA1);
     ma2 = SMA(C, MA2);
 }
Пример #5
0
        DataSeries Close;           //只在Close被修改时才会触发指标计算,以避免多个input造成指标计算多次的性能问题.

        protected override void Init()
        {
            Close = Input;
            bop   = new DataSeries(this.Input);
            sma   = SMA(bop, Smooth);
        }
Пример #6
0
 protected override void Init()
 {
     stdDev = StdDev(this.Input, 5);
     sma    = SMA(stdDev.Value, 10);
 }
Пример #7
0
 /// <summary>
 ///
 /// </summary>
 protected override void Init()
 {
     NumStdDev = 2;
     sma       = SMA(Input, Period);
     stdDev    = StdDev(Input, Period);
 }
Пример #8
0
        DataSeries Close;           //只在Close被修改时才会触发指标计算,以避免多个input造成指标计算多次的性能问题.

        protected override void Init()
        {
            Close   = Input;
            Typical = new DataSeries(this.Input);
            sma     = SMA(Typical, Period);
        }