/// <summary>
        /// Ehlers 111
        /// </summary>
        /// <returns></returns>
        public zzCyclePeriod zzCyclePeriod(Data.IDataSeries input, double alpha, double smoothAlpha)
        {
            if (cachezzCyclePeriod != null)
            {
                for (int idx = 0; idx < cachezzCyclePeriod.Length; idx++)
                {
                    if (Math.Abs(cachezzCyclePeriod[idx].Alpha - alpha) <= double.Epsilon && Math.Abs(cachezzCyclePeriod[idx].SmoothAlpha - smoothAlpha) <= double.Epsilon && cachezzCyclePeriod[idx].EqualsInput(input))
                    {
                        return(cachezzCyclePeriod[idx]);
                    }
                }
            }

            lock (checkzzCyclePeriod)
            {
                checkzzCyclePeriod.Alpha = alpha;
                alpha = checkzzCyclePeriod.Alpha;
                checkzzCyclePeriod.SmoothAlpha = smoothAlpha;
                smoothAlpha = checkzzCyclePeriod.SmoothAlpha;

                if (cachezzCyclePeriod != null)
                {
                    for (int idx = 0; idx < cachezzCyclePeriod.Length; idx++)
                    {
                        if (Math.Abs(cachezzCyclePeriod[idx].Alpha - alpha) <= double.Epsilon && Math.Abs(cachezzCyclePeriod[idx].SmoothAlpha - smoothAlpha) <= double.Epsilon && cachezzCyclePeriod[idx].EqualsInput(input))
                        {
                            return(cachezzCyclePeriod[idx]);
                        }
                    }
                }

                zzCyclePeriod indicator = new zzCyclePeriod();
                indicator.BarsRequired        = BarsRequired;
                indicator.CalculateOnBarClose = CalculateOnBarClose;
#if NT7
                indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
                indicator.MaximumBarsLookBack         = MaximumBarsLookBack;
#endif
                indicator.Input       = input;
                indicator.Alpha       = alpha;
                indicator.SmoothAlpha = smoothAlpha;
                Indicators.Add(indicator);
                indicator.SetUp();

                zzCyclePeriod[] tmp = new zzCyclePeriod[cachezzCyclePeriod == null ? 1 : cachezzCyclePeriod.Length + 1];
                if (cachezzCyclePeriod != null)
                {
                    cachezzCyclePeriod.CopyTo(tmp, 0);
                }
                tmp[tmp.Length - 1] = indicator;
                cachezzCyclePeriod  = tmp;
                return(indicator);
            }
        }
 protected override void OnStartUp()
 {
     smooth = zDexpSmooth(smalpha, 1, false);
     cycle  = new DataSeries(this);
     cycper = zzCyclePeriod(0.07, 0.3333);
 }