/// <summary> /// Sample for basic 15/30/60 min chart intraday KAMA on NT7, best load on 5 min intraday chart /// </summary> /// <returns></returns> public SampleMTFKama SampleMTFKama(Data.IDataSeries input) { if (cacheSampleMTFKama != null) { for (int idx = 0; idx < cacheSampleMTFKama.Length; idx++) { if (cacheSampleMTFKama[idx].EqualsInput(input)) { return(cacheSampleMTFKama[idx]); } } } lock (checkSampleMTFKama) { if (cacheSampleMTFKama != null) { for (int idx = 0; idx < cacheSampleMTFKama.Length; idx++) { if (cacheSampleMTFKama[idx].EqualsInput(input)) { return(cacheSampleMTFKama[idx]); } } } SampleMTFKama indicator = new SampleMTFKama(); indicator.BarsRequired = BarsRequired; indicator.CalculateOnBarClose = CalculateOnBarClose; #if NT7 indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256; indicator.MaximumBarsLookBack = MaximumBarsLookBack; #endif indicator.Input = input; Indicators.Add(indicator); indicator.SetUp(); SampleMTFKama[] tmp = new SampleMTFKama[cacheSampleMTFKama == null ? 1 : cacheSampleMTFKama.Length + 1]; if (cacheSampleMTFKama != null) { cacheSampleMTFKama.CopyTo(tmp, 0); } tmp[tmp.Length - 1] = indicator; cacheSampleMTFKama = tmp; return(indicator); } }
/// <summary> /// Sample for basic 15/30/60 min chart intraday KAMA on NT7, best load on 5 min intraday chart /// </summary> /// <returns></returns> public SampleMTFKama SampleMTFKama(Data.IDataSeries input) { if (cacheSampleMTFKama != null) for (int idx = 0; idx < cacheSampleMTFKama.Length; idx++) if (cacheSampleMTFKama[idx].EqualsInput(input)) return cacheSampleMTFKama[idx]; lock (checkSampleMTFKama) { if (cacheSampleMTFKama != null) for (int idx = 0; idx < cacheSampleMTFKama.Length; idx++) if (cacheSampleMTFKama[idx].EqualsInput(input)) return cacheSampleMTFKama[idx]; SampleMTFKama indicator = new SampleMTFKama(); indicator.BarsRequired = BarsRequired; indicator.CalculateOnBarClose = CalculateOnBarClose; #if NT7 indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256; indicator.MaximumBarsLookBack = MaximumBarsLookBack; #endif indicator.Input = input; Indicators.Add(indicator); indicator.SetUp(); SampleMTFKama[] tmp = new SampleMTFKama[cacheSampleMTFKama == null ? 1 : cacheSampleMTFKama.Length + 1]; if (cacheSampleMTFKama != null) cacheSampleMTFKama.CopyTo(tmp, 0); tmp[tmp.Length - 1] = indicator; cacheSampleMTFKama = tmp; return indicator; } }