Exemplo n.º 1
0
Arquivo: DMI.cs Projeto: zxt1121/hf_at
        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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
Arquivo: RSI.cs Projeto: zxt1121/hf_at
        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);
        }
Exemplo n.º 4
0
 public override void Initialize()
 {
     ma1 = SMA(C, MA1);
     ma2 = SMA(C, MA2);
 }
Exemplo n.º 5
0
        DataSeries Close;           //只在Close被修改时才会触发指标计算,以避免多个input造成指标计算多次的性能问题.

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

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