/// <summary>
        /// Alerts you when there is a volume spike
        /// </summary>
        /// <returns></returns>
        public VolumeSpike VolumeSpike(Data.IDataSeries input, double spike)
        {
            if (cacheVolumeSpike != null)
            {
                for (int idx = 0; idx < cacheVolumeSpike.Length; idx++)
                {
                    if (Math.Abs(cacheVolumeSpike[idx].Spike - spike) <= double.Epsilon && cacheVolumeSpike[idx].EqualsInput(input))
                    {
                        return(cacheVolumeSpike[idx]);
                    }
                }
            }

            lock (checkVolumeSpike)
            {
                checkVolumeSpike.Spike = spike;
                spike = checkVolumeSpike.Spike;

                if (cacheVolumeSpike != null)
                {
                    for (int idx = 0; idx < cacheVolumeSpike.Length; idx++)
                    {
                        if (Math.Abs(cacheVolumeSpike[idx].Spike - spike) <= double.Epsilon && cacheVolumeSpike[idx].EqualsInput(input))
                        {
                            return(cacheVolumeSpike[idx]);
                        }
                    }
                }

                VolumeSpike indicator = new VolumeSpike();
                indicator.BarsRequired        = BarsRequired;
                indicator.CalculateOnBarClose = CalculateOnBarClose;
#if NT7
                indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
                indicator.MaximumBarsLookBack         = MaximumBarsLookBack;
#endif
                indicator.Input = input;
                indicator.Spike = spike;
                Indicators.Add(indicator);
                indicator.SetUp();

                VolumeSpike[] tmp = new VolumeSpike[cacheVolumeSpike == null ? 1 : cacheVolumeSpike.Length + 1];
                if (cacheVolumeSpike != null)
                {
                    cacheVolumeSpike.CopyTo(tmp, 0);
                }
                tmp[tmp.Length - 1] = indicator;
                cacheVolumeSpike    = tmp;
                return(indicator);
            }
        }
        /// <summary>
        /// Alerts you when there is a volume spike
        /// </summary>
        /// <returns></returns>
        public VolumeSpike VolumeSpike(Data.IDataSeries input, double spike)
        {
            if (cacheVolumeSpike != null)
                for (int idx = 0; idx < cacheVolumeSpike.Length; idx++)
                    if (Math.Abs(cacheVolumeSpike[idx].Spike - spike) <= double.Epsilon && cacheVolumeSpike[idx].EqualsInput(input))
                        return cacheVolumeSpike[idx];

            lock (checkVolumeSpike)
            {
                checkVolumeSpike.Spike = spike;
                spike = checkVolumeSpike.Spike;

                if (cacheVolumeSpike != null)
                    for (int idx = 0; idx < cacheVolumeSpike.Length; idx++)
                        if (Math.Abs(cacheVolumeSpike[idx].Spike - spike) <= double.Epsilon && cacheVolumeSpike[idx].EqualsInput(input))
                            return cacheVolumeSpike[idx];

                VolumeSpike indicator = new VolumeSpike();
                indicator.BarsRequired = BarsRequired;
                indicator.CalculateOnBarClose = CalculateOnBarClose;
#if NT7
                indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
                indicator.MaximumBarsLookBack = MaximumBarsLookBack;
#endif
                indicator.Input = input;
                indicator.Spike = spike;
                Indicators.Add(indicator);
                indicator.SetUp();

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