Пример #1
0
        protected override void Init()
        {
            avg = divisor = intercept = myPeriod = priorSumXY = priorSumY = slope = sumX = sumX2 = sumY = sumXY = 0;

            sum = SUM(Input, Period);
            y   = new DataSeries(Input);
        }
Пример #2
0
        protected override void Init()
        {
            Close = Input;

            moneyFlow    = new DataSeries(this.Input);
            sumMoneyFlow = SUM(moneyFlow, Period);
            sumVolume    = SUM(Volume, Period);
        }
Пример #3
0
        DataSeries Close;           //只在Close被修改时才会触发指标计算,以避免多个input造成指标计算多次的性能问题.

        protected override void Init()
        {
            Close   = Input;
            Typical = new DataSeries(Input);

            negative    = new DataSeries(Input);
            positive    = new DataSeries(Input);
            sumNegative = SUM(negative, Period);
            sumPositive = SUM(positive, Period);
        }
Пример #4
0
        protected override void Init()
        {
            Close = Input;

            constant1 = Slow / Fast;
            constant2 = Slow / Intermediate;
            constant3 = constant1 + constant2 + 1;

            buyingPressure    = new DataSeries(Input);
            trueRange         = new DataSeries(Input);
            sumBpFast         = SUM(buyingPressure, Fast);
            sumBpIntermediate = SUM(buyingPressure, Intermediate);
            sumBpSlow         = SUM(buyingPressure, Slow);
            sumTrFast         = SUM(trueRange, Fast);
            sumTrIntermediate = SUM(trueRange, Intermediate);
            sumTrSlow         = SUM(trueRange, Slow);
        }