/// <summary>
        /// Chaikin Volatility
        /// </summary>
        /// <returns></returns>
        public ChaikinVolatility ChaikinVolatility(Data.IDataSeries input, int period)
        {
            if (cacheChaikinVolatility != null)
            {
                for (int idx = 0; idx < cacheChaikinVolatility.Length; idx++)
                {
                    if (cacheChaikinVolatility[idx].Period == period && cacheChaikinVolatility[idx].EqualsInput(input))
                    {
                        return(cacheChaikinVolatility[idx]);
                    }
                }
            }

            lock (checkChaikinVolatility)
            {
                checkChaikinVolatility.Period = period;
                period = checkChaikinVolatility.Period;

                if (cacheChaikinVolatility != null)
                {
                    for (int idx = 0; idx < cacheChaikinVolatility.Length; idx++)
                    {
                        if (cacheChaikinVolatility[idx].Period == period && cacheChaikinVolatility[idx].EqualsInput(input))
                        {
                            return(cacheChaikinVolatility[idx]);
                        }
                    }
                }

                ChaikinVolatility indicator = new ChaikinVolatility();
                indicator.BarsRequired        = BarsRequired;
                indicator.CalculateOnBarClose = CalculateOnBarClose;
#if NT7
                indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
                indicator.MaximumBarsLookBack         = MaximumBarsLookBack;
#endif
                indicator.Input  = input;
                indicator.Period = period;
                Indicators.Add(indicator);
                indicator.SetUp();

                ChaikinVolatility[] tmp = new ChaikinVolatility[cacheChaikinVolatility == null ? 1 : cacheChaikinVolatility.Length + 1];
                if (cacheChaikinVolatility != null)
                {
                    cacheChaikinVolatility.CopyTo(tmp, 0);
                }
                tmp[tmp.Length - 1]    = indicator;
                cacheChaikinVolatility = tmp;
                return(indicator);
            }
        }
        /// <summary>
        /// Chaikin Volatility
        /// </summary>
        /// <returns></returns>
        public ChaikinVolatility ChaikinVolatility(Data.IDataSeries input, int period)
        {
            if (cacheChaikinVolatility != null)
                for (int idx = 0; idx < cacheChaikinVolatility.Length; idx++)
                    if (cacheChaikinVolatility[idx].Period == period && cacheChaikinVolatility[idx].EqualsInput(input))
                        return cacheChaikinVolatility[idx];

            lock (checkChaikinVolatility)
            {
                checkChaikinVolatility.Period = period;
                period = checkChaikinVolatility.Period;

                if (cacheChaikinVolatility != null)
                    for (int idx = 0; idx < cacheChaikinVolatility.Length; idx++)
                        if (cacheChaikinVolatility[idx].Period == period && cacheChaikinVolatility[idx].EqualsInput(input))
                            return cacheChaikinVolatility[idx];

                ChaikinVolatility indicator = new ChaikinVolatility();
                indicator.BarsRequired = BarsRequired;
                indicator.CalculateOnBarClose = CalculateOnBarClose;
#if NT7
                indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
                indicator.MaximumBarsLookBack = MaximumBarsLookBack;
#endif
                indicator.Input = input;
                indicator.Period = period;
                Indicators.Add(indicator);
                indicator.SetUp();

                ChaikinVolatility[] tmp = new ChaikinVolatility[cacheChaikinVolatility == null ? 1 : cacheChaikinVolatility.Length + 1];
                if (cacheChaikinVolatility != null)
                    cacheChaikinVolatility.CopyTo(tmp, 0);
                tmp[tmp.Length - 1] = indicator;
                cacheChaikinVolatility = tmp;
                return indicator;
            }
        }