/// <summary>
        /// Value Charts by David Stendhal; Converted to NinjaTrader by TradingStudies.com
        /// </summary>
        /// <returns></returns>
        public AtrOffsetDot ATROffsetDot(Data.IDataSeries input, Color downColor, int length, double multiplier, float radius, Color upColor)
        {
            if (cacheATROffsetDot != null)
            {
                for (int idx = 0; idx < cacheATROffsetDot.Length; idx++)
                {
                    if (cacheATROffsetDot[idx].DownColor == downColor && cacheATROffsetDot[idx].Length == length && Math.Abs(cacheATROffsetDot[idx].Multiplier - multiplier) <= double.Epsilon && cacheATROffsetDot[idx].Radius == radius && cacheATROffsetDot[idx].UpColor == upColor && cacheATROffsetDot[idx].EqualsInput(input))
                    {
                        return(cacheATROffsetDot[idx]);
                    }
                }
            }

            lock (checkATROffsetDot)
            {
                checkATROffsetDot.DownColor = downColor;
                downColor = checkATROffsetDot.DownColor;
                checkATROffsetDot.Length = length;
                length = checkATROffsetDot.Length;
                checkATROffsetDot.Multiplier = multiplier;
                multiplier = checkATROffsetDot.Multiplier;
                checkATROffsetDot.Radius = radius;
                radius = checkATROffsetDot.Radius;
                checkATROffsetDot.UpColor = upColor;
                upColor = checkATROffsetDot.UpColor;

                if (cacheATROffsetDot != null)
                {
                    for (int idx = 0; idx < cacheATROffsetDot.Length; idx++)
                    {
                        if (cacheATROffsetDot[idx].DownColor == downColor && cacheATROffsetDot[idx].Length == length && Math.Abs(cacheATROffsetDot[idx].Multiplier - multiplier) <= double.Epsilon && cacheATROffsetDot[idx].Radius == radius && cacheATROffsetDot[idx].UpColor == upColor && cacheATROffsetDot[idx].EqualsInput(input))
                        {
                            return(cacheATROffsetDot[idx]);
                        }
                    }
                }

                AtrOffsetDot indicator = new AtrOffsetDot();
                indicator.BarsRequired        = BarsRequired;
                indicator.CalculateOnBarClose = CalculateOnBarClose;
#if NT7
                indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
                indicator.MaximumBarsLookBack         = MaximumBarsLookBack;
#endif
                indicator.Input      = input;
                indicator.DownColor  = downColor;
                indicator.Length     = length;
                indicator.Multiplier = multiplier;
                indicator.Radius     = radius;
                indicator.UpColor    = upColor;
                Indicators.Add(indicator);
                indicator.SetUp();

                AtrOffsetDot[] tmp = new AtrOffsetDot[cacheATROffsetDot == null ? 1 : cacheATROffsetDot.Length + 1];
                if (cacheATROffsetDot != null)
                {
                    cacheATROffsetDot.CopyTo(tmp, 0);
                }
                tmp[tmp.Length - 1] = indicator;
                cacheATROffsetDot   = tmp;
                return(indicator);
            }
        }
        /// <summary>
        /// Value Charts by David Stendhal; Converted to NinjaTrader by TradingStudies.com
        /// </summary>
        /// <returns></returns>
        public AtrOffsetDot ATROffsetDot(Data.IDataSeries input, Color downColor, int length, double multiplier, float radius, Color upColor)
        {
            if (cacheATROffsetDot != null)
                for (int idx = 0; idx < cacheATROffsetDot.Length; idx++)
                    if (cacheATROffsetDot[idx].DownColor == downColor && cacheATROffsetDot[idx].Length == length && Math.Abs(cacheATROffsetDot[idx].Multiplier - multiplier) <= double.Epsilon && cacheATROffsetDot[idx].Radius == radius && cacheATROffsetDot[idx].UpColor == upColor && cacheATROffsetDot[idx].EqualsInput(input))
                        return cacheATROffsetDot[idx];

            lock (checkATROffsetDot)
            {
                checkATROffsetDot.DownColor = downColor;
                downColor = checkATROffsetDot.DownColor;
                checkATROffsetDot.Length = length;
                length = checkATROffsetDot.Length;
                checkATROffsetDot.Multiplier = multiplier;
                multiplier = checkATROffsetDot.Multiplier;
                checkATROffsetDot.Radius = radius;
                radius = checkATROffsetDot.Radius;
                checkATROffsetDot.UpColor = upColor;
                upColor = checkATROffsetDot.UpColor;

                if (cacheATROffsetDot != null)
                    for (int idx = 0; idx < cacheATROffsetDot.Length; idx++)
                        if (cacheATROffsetDot[idx].DownColor == downColor && cacheATROffsetDot[idx].Length == length && Math.Abs(cacheATROffsetDot[idx].Multiplier - multiplier) <= double.Epsilon && cacheATROffsetDot[idx].Radius == radius && cacheATROffsetDot[idx].UpColor == upColor && cacheATROffsetDot[idx].EqualsInput(input))
                            return cacheATROffsetDot[idx];

                AtrOffsetDot indicator = new AtrOffsetDot();
                indicator.BarsRequired = BarsRequired;
                indicator.CalculateOnBarClose = CalculateOnBarClose;
#if NT7
                indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
                indicator.MaximumBarsLookBack = MaximumBarsLookBack;
#endif
                indicator.Input = input;
                indicator.DownColor = downColor;
                indicator.Length = length;
                indicator.Multiplier = multiplier;
                indicator.Radius = radius;
                indicator.UpColor = upColor;
                Indicators.Add(indicator);
                indicator.SetUp();

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