/// <summary>
        /// RSX double (THD version)
        /// </summary>
        /// <returns></returns>
        public Jurik_RSX_double_THD Jurik_RSX_double_THD(Data.IDataSeries input, double __LowerBand, double __UpperBand, double _RSX_fast_len, double _RSX_slow_len, double blend, double colorShift)
        {
            if (cacheJurik_RSX_double_THD != null)
                for (int idx = 0; idx < cacheJurik_RSX_double_THD.Length; idx++)
                    if (Math.Abs(cacheJurik_RSX_double_THD[idx].__LowerBand - __LowerBand) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx].__UpperBand - __UpperBand) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx]._RSX_fast_len - _RSX_fast_len) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx]._RSX_slow_len - _RSX_slow_len) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx].Blend - blend) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx].ColorShift - colorShift) <= double.Epsilon && cacheJurik_RSX_double_THD[idx].EqualsInput(input))
                        return cacheJurik_RSX_double_THD[idx];

            lock (checkJurik_RSX_double_THD)
            {
                checkJurik_RSX_double_THD.__LowerBand = __LowerBand;
                __LowerBand = checkJurik_RSX_double_THD.__LowerBand;
                checkJurik_RSX_double_THD.__UpperBand = __UpperBand;
                __UpperBand = checkJurik_RSX_double_THD.__UpperBand;
                checkJurik_RSX_double_THD._RSX_fast_len = _RSX_fast_len;
                _RSX_fast_len = checkJurik_RSX_double_THD._RSX_fast_len;
                checkJurik_RSX_double_THD._RSX_slow_len = _RSX_slow_len;
                _RSX_slow_len = checkJurik_RSX_double_THD._RSX_slow_len;
                checkJurik_RSX_double_THD.Blend = blend;
                blend = checkJurik_RSX_double_THD.Blend;
                checkJurik_RSX_double_THD.ColorShift = colorShift;
                colorShift = checkJurik_RSX_double_THD.ColorShift;

                if (cacheJurik_RSX_double_THD != null)
                    for (int idx = 0; idx < cacheJurik_RSX_double_THD.Length; idx++)
                        if (Math.Abs(cacheJurik_RSX_double_THD[idx].__LowerBand - __LowerBand) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx].__UpperBand - __UpperBand) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx]._RSX_fast_len - _RSX_fast_len) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx]._RSX_slow_len - _RSX_slow_len) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx].Blend - blend) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx].ColorShift - colorShift) <= double.Epsilon && cacheJurik_RSX_double_THD[idx].EqualsInput(input))
                            return cacheJurik_RSX_double_THD[idx];

                Jurik_RSX_double_THD indicator = new Jurik_RSX_double_THD();
                indicator.BarsRequired = BarsRequired;
                indicator.CalculateOnBarClose = CalculateOnBarClose;
#if NT7
                indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
                indicator.MaximumBarsLookBack = MaximumBarsLookBack;
#endif
                indicator.Input = input;
                indicator.__LowerBand = __LowerBand;
                indicator.__UpperBand = __UpperBand;
                indicator._RSX_fast_len = _RSX_fast_len;
                indicator._RSX_slow_len = _RSX_slow_len;
                indicator.Blend = blend;
                indicator.ColorShift = colorShift;
                Indicators.Add(indicator);
                indicator.SetUp();

                Jurik_RSX_double_THD[] tmp = new Jurik_RSX_double_THD[cacheJurik_RSX_double_THD == null ? 1 : cacheJurik_RSX_double_THD.Length + 1];
                if (cacheJurik_RSX_double_THD != null)
                    cacheJurik_RSX_double_THD.CopyTo(tmp, 0);
                tmp[tmp.Length - 1] = indicator;
                cacheJurik_RSX_double_THD = tmp;
                return indicator;
            }
        }
예제 #2
0
        /// <summary>
        /// RSX double (THD version)
        /// </summary>
        /// <returns></returns>
        public Jurik_RSX_double_THD Jurik_RSX_double_THD(Data.IDataSeries input, double __LowerBand, double __UpperBand, double _RSX_fast_len, double _RSX_slow_len, double blend, double colorShift)
        {
            if (cacheJurik_RSX_double_THD != null)
            {
                for (int idx = 0; idx < cacheJurik_RSX_double_THD.Length; idx++)
                {
                    if (Math.Abs(cacheJurik_RSX_double_THD[idx].__LowerBand - __LowerBand) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx].__UpperBand - __UpperBand) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx]._RSX_fast_len - _RSX_fast_len) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx]._RSX_slow_len - _RSX_slow_len) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx].Blend - blend) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx].ColorShift - colorShift) <= double.Epsilon && cacheJurik_RSX_double_THD[idx].EqualsInput(input))
                    {
                        return(cacheJurik_RSX_double_THD[idx]);
                    }
                }
            }

            lock (checkJurik_RSX_double_THD)
            {
                checkJurik_RSX_double_THD.__LowerBand = __LowerBand;
                __LowerBand = checkJurik_RSX_double_THD.__LowerBand;
                checkJurik_RSX_double_THD.__UpperBand = __UpperBand;
                __UpperBand = checkJurik_RSX_double_THD.__UpperBand;
                checkJurik_RSX_double_THD._RSX_fast_len = _RSX_fast_len;
                _RSX_fast_len = checkJurik_RSX_double_THD._RSX_fast_len;
                checkJurik_RSX_double_THD._RSX_slow_len = _RSX_slow_len;
                _RSX_slow_len = checkJurik_RSX_double_THD._RSX_slow_len;
                checkJurik_RSX_double_THD.Blend = blend;
                blend = checkJurik_RSX_double_THD.Blend;
                checkJurik_RSX_double_THD.ColorShift = colorShift;
                colorShift = checkJurik_RSX_double_THD.ColorShift;

                if (cacheJurik_RSX_double_THD != null)
                {
                    for (int idx = 0; idx < cacheJurik_RSX_double_THD.Length; idx++)
                    {
                        if (Math.Abs(cacheJurik_RSX_double_THD[idx].__LowerBand - __LowerBand) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx].__UpperBand - __UpperBand) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx]._RSX_fast_len - _RSX_fast_len) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx]._RSX_slow_len - _RSX_slow_len) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx].Blend - blend) <= double.Epsilon && Math.Abs(cacheJurik_RSX_double_THD[idx].ColorShift - colorShift) <= double.Epsilon && cacheJurik_RSX_double_THD[idx].EqualsInput(input))
                        {
                            return(cacheJurik_RSX_double_THD[idx]);
                        }
                    }
                }

                Jurik_RSX_double_THD indicator = new Jurik_RSX_double_THD();
                indicator.BarsRequired        = BarsRequired;
                indicator.CalculateOnBarClose = CalculateOnBarClose;
#if NT7
                indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
                indicator.MaximumBarsLookBack         = MaximumBarsLookBack;
#endif
                indicator.Input         = input;
                indicator.__LowerBand   = __LowerBand;
                indicator.__UpperBand   = __UpperBand;
                indicator._RSX_fast_len = _RSX_fast_len;
                indicator._RSX_slow_len = _RSX_slow_len;
                indicator.Blend         = blend;
                indicator.ColorShift    = colorShift;
                Indicators.Add(indicator);
                indicator.SetUp();

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