/// <summary> /// Plots the cumulative delta as bars. /// </summary> /// <returns></returns> public Indicator.Z20091129CumulativeDelta Z20091129CumulativeDelta(Data.IDataSeries input, long bundleMilliseconds, bool bundleTrades, VolumeStatsMode calcMethod, bool calcWithTicks, double maxSize, double minSize, int widthOverride) { 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.Z20091129CumulativeDelta(input, bundleMilliseconds, bundleTrades, calcMethod, calcWithTicks, maxSize, minSize, widthOverride)); }
/// <summary> /// Plots the cumulative delta as bars. /// </summary> /// <returns></returns> public Z20091129CumulativeDelta Z20091129CumulativeDelta(Data.IDataSeries input, long bundleMilliseconds, bool bundleTrades, VolumeStatsMode calcMethod, bool calcWithTicks, double maxSize, double minSize, int widthOverride) { if (cacheZ20091129CumulativeDelta != null) { for (int idx = 0; idx < cacheZ20091129CumulativeDelta.Length; idx++) { if (cacheZ20091129CumulativeDelta[idx].BundleMilliseconds == bundleMilliseconds && cacheZ20091129CumulativeDelta[idx].BundleTrades == bundleTrades && cacheZ20091129CumulativeDelta[idx].CalcMethod == calcMethod && cacheZ20091129CumulativeDelta[idx].CalcWithTicks == calcWithTicks && Math.Abs(cacheZ20091129CumulativeDelta[idx].MaxSize - maxSize) <= double.Epsilon && Math.Abs(cacheZ20091129CumulativeDelta[idx].MinSize - minSize) <= double.Epsilon && cacheZ20091129CumulativeDelta[idx].WidthOverride == widthOverride && cacheZ20091129CumulativeDelta[idx].EqualsInput(input)) { return(cacheZ20091129CumulativeDelta[idx]); } } } lock (checkZ20091129CumulativeDelta) { checkZ20091129CumulativeDelta.BundleMilliseconds = bundleMilliseconds; bundleMilliseconds = checkZ20091129CumulativeDelta.BundleMilliseconds; checkZ20091129CumulativeDelta.BundleTrades = bundleTrades; bundleTrades = checkZ20091129CumulativeDelta.BundleTrades; checkZ20091129CumulativeDelta.CalcMethod = calcMethod; calcMethod = checkZ20091129CumulativeDelta.CalcMethod; checkZ20091129CumulativeDelta.CalcWithTicks = calcWithTicks; calcWithTicks = checkZ20091129CumulativeDelta.CalcWithTicks; checkZ20091129CumulativeDelta.MaxSize = maxSize; maxSize = checkZ20091129CumulativeDelta.MaxSize; checkZ20091129CumulativeDelta.MinSize = minSize; minSize = checkZ20091129CumulativeDelta.MinSize; checkZ20091129CumulativeDelta.WidthOverride = widthOverride; widthOverride = checkZ20091129CumulativeDelta.WidthOverride; if (cacheZ20091129CumulativeDelta != null) { for (int idx = 0; idx < cacheZ20091129CumulativeDelta.Length; idx++) { if (cacheZ20091129CumulativeDelta[idx].BundleMilliseconds == bundleMilliseconds && cacheZ20091129CumulativeDelta[idx].BundleTrades == bundleTrades && cacheZ20091129CumulativeDelta[idx].CalcMethod == calcMethod && cacheZ20091129CumulativeDelta[idx].CalcWithTicks == calcWithTicks && Math.Abs(cacheZ20091129CumulativeDelta[idx].MaxSize - maxSize) <= double.Epsilon && Math.Abs(cacheZ20091129CumulativeDelta[idx].MinSize - minSize) <= double.Epsilon && cacheZ20091129CumulativeDelta[idx].WidthOverride == widthOverride && cacheZ20091129CumulativeDelta[idx].EqualsInput(input)) { return(cacheZ20091129CumulativeDelta[idx]); } } } Z20091129CumulativeDelta indicator = new Z20091129CumulativeDelta(); indicator.BarsRequired = BarsRequired; indicator.CalculateOnBarClose = CalculateOnBarClose; #if NT7 indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256; indicator.MaximumBarsLookBack = MaximumBarsLookBack; #endif indicator.Input = input; indicator.BundleMilliseconds = bundleMilliseconds; indicator.BundleTrades = bundleTrades; indicator.CalcMethod = calcMethod; indicator.CalcWithTicks = calcWithTicks; indicator.MaxSize = maxSize; indicator.MinSize = minSize; indicator.WidthOverride = widthOverride; Indicators.Add(indicator); indicator.SetUp(); Z20091129CumulativeDelta[] tmp = new Z20091129CumulativeDelta[cacheZ20091129CumulativeDelta == null ? 1 : cacheZ20091129CumulativeDelta.Length + 1]; if (cacheZ20091129CumulativeDelta != null) { cacheZ20091129CumulativeDelta.CopyTo(tmp, 0); } tmp[tmp.Length - 1] = indicator; cacheZ20091129CumulativeDelta = tmp; return(indicator); } }
public Indicator.Z20091129CumulativeDelta Z20091129CumulativeDelta(long bundleMilliseconds, bool bundleTrades, VolumeStatsMode calcMethod, bool calcWithTicks, double maxSize, double minSize, int widthOverride) { return(_indicator.Z20091129CumulativeDelta(Input, bundleMilliseconds, bundleTrades, calcMethod, calcWithTicks, maxSize, minSize, widthOverride)); }
public Indicator.Z20091129VolumeStats Z20091129VolumeStats(long bundleMilliseconds, bool bundleTrades, VolumeStatsMode calcMethod, double maxSize, double minSize) { return(_indicator.Z20091129VolumeStats(Input, bundleMilliseconds, bundleTrades, calcMethod, maxSize, minSize)); }