/// <summary> /// Richard Todd www.movethemarkets.com 3-color colorizer /// </summary> /// <returns></returns> public Z20091221Colorizer3 Z20091221Colorizer3(Data.IDataSeries input, Colorizer3Method colorMethod, double colorParam) { if (cacheZ20091221Colorizer3 != null) { for (int idx = 0; idx < cacheZ20091221Colorizer3.Length; idx++) { if (cacheZ20091221Colorizer3[idx].ColorMethod == colorMethod && Math.Abs(cacheZ20091221Colorizer3[idx].ColorParam - colorParam) <= double.Epsilon && cacheZ20091221Colorizer3[idx].EqualsInput(input)) { return(cacheZ20091221Colorizer3[idx]); } } } lock (checkZ20091221Colorizer3) { checkZ20091221Colorizer3.ColorMethod = colorMethod; colorMethod = checkZ20091221Colorizer3.ColorMethod; checkZ20091221Colorizer3.ColorParam = colorParam; colorParam = checkZ20091221Colorizer3.ColorParam; if (cacheZ20091221Colorizer3 != null) { for (int idx = 0; idx < cacheZ20091221Colorizer3.Length; idx++) { if (cacheZ20091221Colorizer3[idx].ColorMethod == colorMethod && Math.Abs(cacheZ20091221Colorizer3[idx].ColorParam - colorParam) <= double.Epsilon && cacheZ20091221Colorizer3[idx].EqualsInput(input)) { return(cacheZ20091221Colorizer3[idx]); } } } Z20091221Colorizer3 indicator = new Z20091221Colorizer3(); indicator.BarsRequired = BarsRequired; indicator.CalculateOnBarClose = CalculateOnBarClose; #if NT7 indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256; indicator.MaximumBarsLookBack = MaximumBarsLookBack; #endif indicator.Input = input; indicator.ColorMethod = colorMethod; indicator.ColorParam = colorParam; Indicators.Add(indicator); indicator.SetUp(); Z20091221Colorizer3[] tmp = new Z20091221Colorizer3[cacheZ20091221Colorizer3 == null ? 1 : cacheZ20091221Colorizer3.Length + 1]; if (cacheZ20091221Colorizer3 != null) { cacheZ20091221Colorizer3.CopyTo(tmp, 0); } tmp[tmp.Length - 1] = indicator; cacheZ20091221Colorizer3 = tmp; return(indicator); } }
/// <summary> /// The price proxy /// </summary> /// <returns></returns> public Z20090722PriceProxy Z20090722PriceProxy(Data.IDataSeries input, Colorizer3Method colorMethod, double colorParam, int lookback, int tolerance, int windowLength) { checkZ20090722PriceProxy.ColorMethod = colorMethod; colorMethod = checkZ20090722PriceProxy.ColorMethod; checkZ20090722PriceProxy.ColorParam = colorParam; colorParam = checkZ20090722PriceProxy.ColorParam; checkZ20090722PriceProxy.Lookback = lookback; lookback = checkZ20090722PriceProxy.Lookback; checkZ20090722PriceProxy.Tolerance = tolerance; tolerance = checkZ20090722PriceProxy.Tolerance; checkZ20090722PriceProxy.WindowLength = windowLength; windowLength = checkZ20090722PriceProxy.WindowLength; if (cacheZ20090722PriceProxy != null) { for (int idx = 0; idx < cacheZ20090722PriceProxy.Length; idx++) { if (cacheZ20090722PriceProxy[idx].ColorMethod == colorMethod && Math.Abs(cacheZ20090722PriceProxy[idx].ColorParam - colorParam) <= double.Epsilon && cacheZ20090722PriceProxy[idx].Lookback == lookback && cacheZ20090722PriceProxy[idx].Tolerance == tolerance && cacheZ20090722PriceProxy[idx].WindowLength == windowLength && cacheZ20090722PriceProxy[idx].EqualsInput(input)) { return(cacheZ20090722PriceProxy[idx]); } } } Z20090722PriceProxy indicator = new Z20090722PriceProxy(); indicator.BarsRequired = BarsRequired; indicator.CalculateOnBarClose = CalculateOnBarClose; indicator.Input = input; indicator.ColorMethod = colorMethod; indicator.ColorParam = colorParam; indicator.Lookback = lookback; indicator.Tolerance = tolerance; indicator.WindowLength = windowLength; indicator.SetUp(); Z20090722PriceProxy[] tmp = new Z20090722PriceProxy[cacheZ20090722PriceProxy == null ? 1 : cacheZ20090722PriceProxy.Length + 1]; if (cacheZ20090722PriceProxy != null) { cacheZ20090722PriceProxy.CopyTo(tmp, 0); } tmp[tmp.Length - 1] = indicator; cacheZ20090722PriceProxy = tmp; Indicators.Add(indicator); return(indicator); }
/// <summary> /// The price proxy /// </summary> /// <returns></returns> public Indicator.Z20090722PriceProxy Z20090722PriceProxy(Data.IDataSeries input, Colorizer3Method colorMethod, double colorParam, int lookback, int tolerance, int windowLength) { if (InInitialize && input == null) { throw new ArgumentException("You only can access an indicator with the default input/bar series from within the 'Initialize()' method"); } return(_indicator.Z20090722PriceProxy(input, colorMethod, colorParam, lookback, tolerance, windowLength)); }
public Indicator.Z20090722PriceProxy Z20090722PriceProxy(Colorizer3Method colorMethod, double colorParam, int lookback, int tolerance, int windowLength) { return(_indicator.Z20090722PriceProxy(Input, colorMethod, colorParam, lookback, tolerance, windowLength)); }
/// <summary> /// Richard Todd www.movethemarkets.com 3-color colorizer /// </summary> /// <returns></returns> public Indicator.Z20091221Colorizer3 Z20091221Colorizer3(Data.IDataSeries input, Colorizer3Method colorMethod, double colorParam) { if (InInitialize && input == null) { throw new ArgumentException("You only can access an indicator with the default input/bar series from within the 'Initialize()' method"); } return(_indicator.Z20091221Colorizer3(input, colorMethod, colorParam)); }
public Indicator.Z20091221Colorizer3 Z20091221Colorizer3(Colorizer3Method colorMethod, double colorParam) { return(_indicator.Z20091221Colorizer3(Input, colorMethod, colorParam)); }
/// <summary> /// Richard Todd www.movethemarkets.com 3-color colorizer /// </summary> /// <returns></returns> public Indicator.Z20091221Colorizer3 Z20091221Colorizer3(Data.IDataSeries input, Colorizer3Method colorMethod, double colorParam) { return(_indicator.Z20091221Colorizer3(input, colorMethod, colorParam)); }
/// <summary> /// Richard Todd www.movethemarkets.com 3-color colorizer /// </summary> /// <returns></returns> public Z20091221Colorizer3 Z20091221Colorizer3(Colorizer3Method colorMethod, double colorParam) { return(Z20091221Colorizer3(Input, colorMethod, colorParam)); }