Esempio n. 1
0
        /// <summary>
        /// Gets the value.
        /// </summary>
        /// <returns></returns>
        protected override double AveragePeriods()
        {
            if (Periods.Count < Size)
            {
                return(0.0);
            }

            var period = Periods.Last();

            if (PreviousEMA == 0.0)
            {
                PreviousEMA = base.AveragePeriods();
            }

            PreviousEMA = IndicatorUtils.EMA(period.Close, PreviousEMA, Multiplier);

            return(PreviousEMA);
        }