public Indicator.anaPivotsDailyV43 anaPivotsDailyV43(anaSessionCountPD43 activeSession, anaCalcModePD43 calcMode, anaPivotStylesPD43 pivotFormula, anaSessionTypePD43 pivotSession, bool showMidpivots, bool showPriorPeriods, double userDefinedClose, double userDefinedHigh, double userDefinedLow) { return _indicator.anaPivotsDailyV43(Input, activeSession, calcMode, pivotFormula, pivotSession, showMidpivots, showPriorPeriods, userDefinedClose, userDefinedHigh, userDefinedLow); }
/// <summary> /// Daily Session Pivots. /// </summary> /// <returns></returns> public Indicator.anaPivotsDailyV43 anaPivotsDailyV43(Data.IDataSeries input, anaSessionCountPD43 activeSession, anaCalcModePD43 calcMode, anaPivotStylesPD43 pivotFormula, anaSessionTypePD43 pivotSession, bool showMidpivots, bool showPriorPeriods, double userDefinedClose, double userDefinedHigh, double userDefinedLow) { 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.anaPivotsDailyV43(input, activeSession, calcMode, pivotFormula, pivotSession, showMidpivots, showPriorPeriods, userDefinedClose, userDefinedHigh, userDefinedLow); }
/// <summary> /// Daily Session Pivots. /// </summary> /// <returns></returns> public anaPivotsDailyV43 anaPivotsDailyV43(Data.IDataSeries input, anaSessionCountPD43 activeSession, anaCalcModePD43 calcMode, anaPivotStylesPD43 pivotFormula, anaSessionTypePD43 pivotSession, bool showMidpivots, bool showPriorPeriods, double userDefinedClose, double userDefinedHigh, double userDefinedLow) { if (cacheanaPivotsDailyV43 != null) for (int idx = 0; idx < cacheanaPivotsDailyV43.Length; idx++) if (cacheanaPivotsDailyV43[idx].ActiveSession == activeSession && cacheanaPivotsDailyV43[idx].CalcMode == calcMode && cacheanaPivotsDailyV43[idx].PivotFormula == pivotFormula && cacheanaPivotsDailyV43[idx].PivotSession == pivotSession && cacheanaPivotsDailyV43[idx].ShowMidpivots == showMidpivots && cacheanaPivotsDailyV43[idx].ShowPriorPeriods == showPriorPeriods && Math.Abs(cacheanaPivotsDailyV43[idx].UserDefinedClose - userDefinedClose) <= double.Epsilon && Math.Abs(cacheanaPivotsDailyV43[idx].UserDefinedHigh - userDefinedHigh) <= double.Epsilon && Math.Abs(cacheanaPivotsDailyV43[idx].UserDefinedLow - userDefinedLow) <= double.Epsilon && cacheanaPivotsDailyV43[idx].EqualsInput(input)) return cacheanaPivotsDailyV43[idx]; lock (checkanaPivotsDailyV43) { checkanaPivotsDailyV43.ActiveSession = activeSession; activeSession = checkanaPivotsDailyV43.ActiveSession; checkanaPivotsDailyV43.CalcMode = calcMode; calcMode = checkanaPivotsDailyV43.CalcMode; checkanaPivotsDailyV43.PivotFormula = pivotFormula; pivotFormula = checkanaPivotsDailyV43.PivotFormula; checkanaPivotsDailyV43.PivotSession = pivotSession; pivotSession = checkanaPivotsDailyV43.PivotSession; checkanaPivotsDailyV43.ShowMidpivots = showMidpivots; showMidpivots = checkanaPivotsDailyV43.ShowMidpivots; checkanaPivotsDailyV43.ShowPriorPeriods = showPriorPeriods; showPriorPeriods = checkanaPivotsDailyV43.ShowPriorPeriods; checkanaPivotsDailyV43.UserDefinedClose = userDefinedClose; userDefinedClose = checkanaPivotsDailyV43.UserDefinedClose; checkanaPivotsDailyV43.UserDefinedHigh = userDefinedHigh; userDefinedHigh = checkanaPivotsDailyV43.UserDefinedHigh; checkanaPivotsDailyV43.UserDefinedLow = userDefinedLow; userDefinedLow = checkanaPivotsDailyV43.UserDefinedLow; if (cacheanaPivotsDailyV43 != null) for (int idx = 0; idx < cacheanaPivotsDailyV43.Length; idx++) if (cacheanaPivotsDailyV43[idx].ActiveSession == activeSession && cacheanaPivotsDailyV43[idx].CalcMode == calcMode && cacheanaPivotsDailyV43[idx].PivotFormula == pivotFormula && cacheanaPivotsDailyV43[idx].PivotSession == pivotSession && cacheanaPivotsDailyV43[idx].ShowMidpivots == showMidpivots && cacheanaPivotsDailyV43[idx].ShowPriorPeriods == showPriorPeriods && Math.Abs(cacheanaPivotsDailyV43[idx].UserDefinedClose - userDefinedClose) <= double.Epsilon && Math.Abs(cacheanaPivotsDailyV43[idx].UserDefinedHigh - userDefinedHigh) <= double.Epsilon && Math.Abs(cacheanaPivotsDailyV43[idx].UserDefinedLow - userDefinedLow) <= double.Epsilon && cacheanaPivotsDailyV43[idx].EqualsInput(input)) return cacheanaPivotsDailyV43[idx]; anaPivotsDailyV43 indicator = new anaPivotsDailyV43(); indicator.BarsRequired = BarsRequired; indicator.CalculateOnBarClose = CalculateOnBarClose; #if NT7 indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256; indicator.MaximumBarsLookBack = MaximumBarsLookBack; #endif indicator.Input = input; indicator.ActiveSession = activeSession; indicator.CalcMode = calcMode; indicator.PivotFormula = pivotFormula; indicator.PivotSession = pivotSession; indicator.ShowMidpivots = showMidpivots; indicator.ShowPriorPeriods = showPriorPeriods; indicator.UserDefinedClose = userDefinedClose; indicator.UserDefinedHigh = userDefinedHigh; indicator.UserDefinedLow = userDefinedLow; Indicators.Add(indicator); indicator.SetUp(); anaPivotsDailyV43[] tmp = new anaPivotsDailyV43[cacheanaPivotsDailyV43 == null ? 1 : cacheanaPivotsDailyV43.Length + 1]; if (cacheanaPivotsDailyV43 != null) cacheanaPivotsDailyV43.CopyTo(tmp, 0); tmp[tmp.Length - 1] = indicator; cacheanaPivotsDailyV43 = tmp; return indicator; } }