/// <summary>
		/// </summary>
		protected override void OnStartUp()
		{
			if (Instrument.MasterInstrument.InstrumentType == InstrumentType.Future &&
				(Instrument.MasterInstrument.Name == "EMD" ||Instrument.MasterInstrument.Name == "ES" || Instrument.MasterInstrument.Name == "NQ" 
				||Instrument.MasterInstrument.Name == "YM"||Instrument.MasterInstrument.Name == "GE" ||Instrument.MasterInstrument.Name == "SR" 
				||Instrument.MasterInstrument.Name == "UB"||Instrument.MasterInstrument.Name == "ZB" ||Instrument.MasterInstrument.Name == "ZF"
				||Instrument.MasterInstrument.Name == "ZN"||Instrument.MasterInstrument.Name == "ZQ" ||Instrument.MasterInstrument.Name == "ZT"
				||Instrument.MasterInstrument.Name == "6A"||Instrument.MasterInstrument.Name == "6B" ||Instrument.MasterInstrument.Name == "6C"
				||Instrument.MasterInstrument.Name == "6E"||Instrument.MasterInstrument.Name == "6J" ||Instrument.MasterInstrument.Name == "6M"
				||Instrument.MasterInstrument.Name == "6N"||Instrument.MasterInstrument.Name == "6S" ||Instrument.MasterInstrument.Name == "E7"
				||Instrument.MasterInstrument.Name == "J7"||Instrument.MasterInstrument.Name == "M6A" ||Instrument.MasterInstrument.Name == "M6B" 
				||Instrument.MasterInstrument.Name == "M6C"||Instrument.MasterInstrument.Name == "M6E" ||Instrument.MasterInstrument.Name == "M6J"
				||Instrument.MasterInstrument.Name == "M6S"||Instrument.MasterInstrument.Name == "CL" ||Instrument.MasterInstrument.Name == "EH"
				||Instrument.MasterInstrument.Name == "GC"||Instrument.MasterInstrument.Name == "HG" ||Instrument.MasterInstrument.Name == "HO"
				||Instrument.MasterInstrument.Name == "NG"||Instrument.MasterInstrument.Name == "QG" ||Instrument.MasterInstrument.Name == "QM"
				||Instrument.MasterInstrument.Name == "RB"||Instrument.MasterInstrument.Name == "SI" ||Instrument.MasterInstrument.Name == "YG" 
				||Instrument.MasterInstrument.Name == "YI"||Instrument.MasterInstrument.Name == "GF" ||Instrument.MasterInstrument.Name == "GPB"
				||Instrument.MasterInstrument.Name == "HE"||Instrument.MasterInstrument.Name == "LE" ||Instrument.MasterInstrument.Name == "YC"
				||Instrument.MasterInstrument.Name == "YK"||Instrument.MasterInstrument.Name == "YW" ||Instrument.MasterInstrument.Name == "ZC"
				||Instrument.MasterInstrument.Name == "ZE"||Instrument.MasterInstrument.Name == "ZL" ||Instrument.MasterInstrument.Name == "ZM"
				||Instrument.MasterInstrument.Name == "ZO"||Instrument.MasterInstrument.Name == "ZR" ||Instrument.MasterInstrument.Name == "ZS"
				||Instrument.MasterInstrument.Name == "ZW"))				
				isGlobex = true;
			if (isGlobex)
			{
				publicHoliday[0] = publicHoliday0;
				publicHoliday[1] = publicHoliday1;
				publicHoliday[2] = publicHoliday2;
			}			
			else for(int i=0; i<3; i++)
				publicHoliday[i] = Cbi.Globals.MinDate;
			if (Instrument.MasterInstrument.InstrumentType == Cbi.InstrumentType.Currency || Instrument.MasterInstrument.Name == "DX"|| Instrument.MasterInstrument.Name == "6A"
				|| Instrument.MasterInstrument.Name == "6B" || Instrument.MasterInstrument.Name == "6C" ||Instrument.MasterInstrument.Name == "6E"
				|| Instrument.MasterInstrument.Name == "6J" || Instrument.MasterInstrument.Name == "6M" || Instrument.MasterInstrument.Name == "6S"
				|| Instrument.MasterInstrument.Name == "6N" || Instrument.MasterInstrument.Name == "E7" || Instrument.MasterInstrument.Name == "J7"
				|| Instrument.MasterInstrument.Name == "M6A" || Instrument.MasterInstrument.Name == "M6B" || Instrument.MasterInstrument.Name == "M6C"
				|| Instrument.MasterInstrument.Name == "M6E" || Instrument.MasterInstrument.Name == "M6J" || Instrument.MasterInstrument.Name == "M6S")
				isCurrency = true;
			
			if (pivotSession == anaSessionTypePM43.Auto && isCurrency)
				selectedSession = anaSessionTypePM43.ETH;
			else if(pivotSession == anaSessionTypePM43.Auto)
				selectedSession = anaSessionTypePM43.RTH;
			else
				selectedSession = pivotSession;
			labelFont = new Font ("Arial", labelFontSize);
			if (PivotFormula == anaPivotStylesPM43.Jackson)
			{
				Plots[0].Name = "M-PP";
				Plots[1].Name = "M-R1";
				Plots[2].Name = "M-S1";
				Plots[3].Name = "M-RB1";
				Plots[4].Name = "M-SB1";
				Plots[5].Name = "M-R2";
				Plots[6].Name = "M-S2";
				Plots[7].Name = "M-RB2";
				Plots[8].Name = "M-SB2";
				Plots[9].Name = "M-R3";
				Plots[10].Name = "M-S3";
				jacksonBrush = new SolidBrush(Color.FromArgb(25*opacityJZ, jacksonZonesColor));
			}
			else
			{
				Plots[0].Name = "M-PP";
				Plots[1].Name = "M-R1";
				Plots[2].Name = "M-S1";
				Plots[3].Name = "M-R2";
				Plots[4].Name = "M-S2";
				Plots[5].Name = "M-R3";
				Plots[6].Name = "M-S3";
				Plots[7].Name = "M-R4";
				Plots[8].Name = "M-S4";
				Plots[9].Name = "M-R5";
				Plots[10].Name = "M-S5";
			}		
			pivotBrush = new SolidBrush(Color.FromArgb(25*opacityPR, pivotRangeColor));
			centralBrush = new SolidBrush(Color.FromArgb(25*opacityPR, centralRangeColor));
			pivotLinePen = new Pen(Color.FromArgb(Math.Min(40*opacityPR,255), pivotRangeColor),1);
			pivotLinePen.DashStyle = DashStyle.Dot;
			Plots[0].Pen.Color = pivotColor;
			Plots[1].Pen.Color = resistanceColor;
			Plots[2].Pen.Color = supportColor;
			Plots[3].Pen.Color = resistanceColor;
			Plots[4].Pen.Color = supportColor;
			Plots[5].Pen.Color = resistanceColor;
			Plots[6].Pen.Color = supportColor;
			Plots[7].Pen.Color = resistanceColor;
			Plots[8].Pen.Color = supportColor;
			Plots[9].Pen.Color = resistanceColor;
			Plots[10].Pen.Color = supportColor;
			Plots[11].Pen.Color = midpivotColor;
			Plots[12].Pen.Color = midpivotColor;
			Plots[13].Pen.Color = midpivotColor;
			Plots[14].Pen.Color = midpivotColor;
			Plots[15].Pen.Color = midpivotColor;
			Plots[16].Pen.Color = midpivotColor;
			Plots[17].Pen.Color = midpivotColor;
			Plots[18].Pen.Color = midpivotColor;
			Plots[19].Pen.Color = midpivotColor;
			Plots[20].Pen.Color = midpivotColor;
			Plots[21].Pen.Color = highColor;
			Plots[22].Pen.Color = lowColor;
			Plots[23].Pen.Color = closeColor;
			Plots[24].Pen.Color = centralPivotColor;
			Plots[25].Pen.Color = directionalPivotColor;
			Plots[26].Pen.Color = vwapColor;

			for (int i = 0; i < 11; i++)
			{
				Plots[i].Pen.Width = plot0Width;
				Plots[i].Pen.DashStyle = dash0Style;
			}
			for (int i = 11; i < 21; i++)
			{
				Plots[i].Pen.Width = plot1Width;
				Plots[i].Pen.DashStyle = dash1Style;
			}
			for (int i = 21; i < 24; i++)
			{
				Plots[i].Pen.Width = plot2Width;
				Plots[i].Pen.DashStyle = dash2Style;
			}			
			for (int i = 24; i < 27; i++)
			{
				Plots[i].Pen.Width = plot0Width;
				Plots[i].Pen.DashStyle = dash0Style;
			}			
			if(ChartControl != null)
				errorBrush.Color = ChartControl.AxisColor;
			if (AutoScale)
				AutoScale = false;
			if (Instrument.MasterInstrument.InstrumentType == Cbi.InstrumentType.Currency && (TickSize == 0.00001 || TickSize == 0.001))
				displaySize = 5* TickSize;
			else
				displaySize = TickSize;
			if (!Bars.BarsType.IsIntraday || BarsPeriod.Id == PeriodType.Minute || BarsPeriod.Id == PeriodType.Second)
				tickBuilt = false;
			else
				tickBuilt = true;
			existsHistDailyData = false;
			countDown = 1;
		}
 public Indicator.anaPivotsMonthlyV43 anaPivotsMonthlyV43(anaSessionCountPM43 activeSession, anaCalcModePM43 calcMode, anaPivotStylesPM43 pivotFormula, anaSessionTypePM43 pivotSession, bool showMidpivots, bool showPriorPeriods, double userDefinedClose, double userDefinedHigh, double userDefinedLow)
 {
     return _indicator.anaPivotsMonthlyV43(Input, activeSession, calcMode, pivotFormula, pivotSession, showMidpivots, showPriorPeriods, userDefinedClose, userDefinedHigh, userDefinedLow);
 }
        /// <summary>
        /// Monthly Session Pivots.
        /// </summary>
        /// <returns></returns>
        public Indicator.anaPivotsMonthlyV43 anaPivotsMonthlyV43(Data.IDataSeries input, anaSessionCountPM43 activeSession, anaCalcModePM43 calcMode, anaPivotStylesPM43 pivotFormula, anaSessionTypePM43 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.anaPivotsMonthlyV43(input, activeSession, calcMode, pivotFormula, pivotSession, showMidpivots, showPriorPeriods, userDefinedClose, userDefinedHigh, userDefinedLow);
        }
        /// <summary>
        /// Monthly Session Pivots.
        /// </summary>
        /// <returns></returns>
        public anaPivotsMonthlyV43 anaPivotsMonthlyV43(Data.IDataSeries input, anaSessionCountPM43 activeSession, anaCalcModePM43 calcMode, anaPivotStylesPM43 pivotFormula, anaSessionTypePM43 pivotSession, bool showMidpivots, bool showPriorPeriods, double userDefinedClose, double userDefinedHigh, double userDefinedLow)
        {
            if (cacheanaPivotsMonthlyV43 != null)
                for (int idx = 0; idx < cacheanaPivotsMonthlyV43.Length; idx++)
                    if (cacheanaPivotsMonthlyV43[idx].ActiveSession == activeSession && cacheanaPivotsMonthlyV43[idx].CalcMode == calcMode && cacheanaPivotsMonthlyV43[idx].PivotFormula == pivotFormula && cacheanaPivotsMonthlyV43[idx].PivotSession == pivotSession && cacheanaPivotsMonthlyV43[idx].ShowMidpivots == showMidpivots && cacheanaPivotsMonthlyV43[idx].ShowPriorPeriods == showPriorPeriods && Math.Abs(cacheanaPivotsMonthlyV43[idx].UserDefinedClose - userDefinedClose) <= double.Epsilon && Math.Abs(cacheanaPivotsMonthlyV43[idx].UserDefinedHigh - userDefinedHigh) <= double.Epsilon && Math.Abs(cacheanaPivotsMonthlyV43[idx].UserDefinedLow - userDefinedLow) <= double.Epsilon && cacheanaPivotsMonthlyV43[idx].EqualsInput(input))
                        return cacheanaPivotsMonthlyV43[idx];

            lock (checkanaPivotsMonthlyV43)
            {
                checkanaPivotsMonthlyV43.ActiveSession = activeSession;
                activeSession = checkanaPivotsMonthlyV43.ActiveSession;
                checkanaPivotsMonthlyV43.CalcMode = calcMode;
                calcMode = checkanaPivotsMonthlyV43.CalcMode;
                checkanaPivotsMonthlyV43.PivotFormula = pivotFormula;
                pivotFormula = checkanaPivotsMonthlyV43.PivotFormula;
                checkanaPivotsMonthlyV43.PivotSession = pivotSession;
                pivotSession = checkanaPivotsMonthlyV43.PivotSession;
                checkanaPivotsMonthlyV43.ShowMidpivots = showMidpivots;
                showMidpivots = checkanaPivotsMonthlyV43.ShowMidpivots;
                checkanaPivotsMonthlyV43.ShowPriorPeriods = showPriorPeriods;
                showPriorPeriods = checkanaPivotsMonthlyV43.ShowPriorPeriods;
                checkanaPivotsMonthlyV43.UserDefinedClose = userDefinedClose;
                userDefinedClose = checkanaPivotsMonthlyV43.UserDefinedClose;
                checkanaPivotsMonthlyV43.UserDefinedHigh = userDefinedHigh;
                userDefinedHigh = checkanaPivotsMonthlyV43.UserDefinedHigh;
                checkanaPivotsMonthlyV43.UserDefinedLow = userDefinedLow;
                userDefinedLow = checkanaPivotsMonthlyV43.UserDefinedLow;

                if (cacheanaPivotsMonthlyV43 != null)
                    for (int idx = 0; idx < cacheanaPivotsMonthlyV43.Length; idx++)
                        if (cacheanaPivotsMonthlyV43[idx].ActiveSession == activeSession && cacheanaPivotsMonthlyV43[idx].CalcMode == calcMode && cacheanaPivotsMonthlyV43[idx].PivotFormula == pivotFormula && cacheanaPivotsMonthlyV43[idx].PivotSession == pivotSession && cacheanaPivotsMonthlyV43[idx].ShowMidpivots == showMidpivots && cacheanaPivotsMonthlyV43[idx].ShowPriorPeriods == showPriorPeriods && Math.Abs(cacheanaPivotsMonthlyV43[idx].UserDefinedClose - userDefinedClose) <= double.Epsilon && Math.Abs(cacheanaPivotsMonthlyV43[idx].UserDefinedHigh - userDefinedHigh) <= double.Epsilon && Math.Abs(cacheanaPivotsMonthlyV43[idx].UserDefinedLow - userDefinedLow) <= double.Epsilon && cacheanaPivotsMonthlyV43[idx].EqualsInput(input))
                            return cacheanaPivotsMonthlyV43[idx];

                anaPivotsMonthlyV43 indicator = new anaPivotsMonthlyV43();
                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();

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