protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Enter the description for your new custom Indicator here."; Name = "Gap"; Calculate = Calculate.OnBarClose; IsOverlay = true; DisplayInDataBox = true; DrawOnPricePanel = true; DrawHorizontalGridLines = true; DrawVerticalGridLines = true; PaintPriceMarkers = true; ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right; //Disable this property if your indicator requires custom values that cumulate with each new market data event. //See Help Guide for additional information. IsSuspendedWhileInactive = true; RTHopen = DateTime.Parse("06:30", System.Globalization.CultureInfo.InvariantCulture); RTHclose = DateTime.Parse("13:00", System.Globalization.CultureInfo.InvariantCulture); } else if (State == State.Configure) { startTime = long.Parse(RTHopen.ToString("HHmmss")); endTime = long.Parse(RTHclose.ToString("HHmmss")); AddDataSeries(Data.BarsPeriodType.Minute, 1); ClearOutputWindow(); } }
protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Enter the description for your new custom Indicator here."; Name = "Stats IB DX"; Calculate = Calculate.OnBarClose; IsOverlay = true; DisplayInDataBox = true; DrawOnPricePanel = true; DrawHorizontalGridLines = true; DrawVerticalGridLines = true; PaintPriceMarkers = true; ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right; //Disable this property if your indicator requires custom values that cumulate with each new market data event. //See Help Guide for additional information. IsSuspendedWhileInactive = true; RTHopen = DateTime.Parse("06:31", System.Globalization.CultureInfo.InvariantCulture); IB = DateTime.Parse("07:30", System.Globalization.CultureInfo.InvariantCulture); RTHclose = DateTime.Parse("13:00", System.Globalization.CultureInfo.InvariantCulture); path = NinjaTrader.Core.Globals.UserDataDir + "IBData.csv"; MinIB = 1.0; MinRange = 1.0; CalcIB = true; CalcRange = false; CalcVolume = false; CurrentDayOnly = true; BackgroundColor = Brushes.DimGray; BackgroundOpacity = 90; FontColor = Brushes.WhiteSmoke; OutlineColor = Brushes.DimGray; NoteFont = new SimpleFont("Arial", 12); AreaOpacity = 80; AreaBrush = System.Windows.Media.Brushes.DodgerBlue; textSize = 11; TextBrush = System.Windows.Media.Brushes.WhiteSmoke; } else if (State == State.Configure) { startTime = long.Parse(RTHopen.ToString("HHmmss")); endTime = long.Parse(RTHclose.ToString("HHmmss")); ibTime = long.Parse(IB.ToString("HHmmss")); AddDataSeries(Data.BarsPeriodType.Minute, 1); OrderFlowVWAP1 = OrderFlowVWAP(Close, NinjaTrader.NinjaScript.Indicators.VWAPResolution.Standard, Bars.TradingHours, NinjaTrader.NinjaScript.Indicators.VWAPStandardDeviations.Three, 1, 2, 3); ClearOutputWindow(); } }
protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Enter the description for your new custom Indicator here."; Name = "Read IB and Ext"; Calculate = Calculate.OnBarClose; IsOverlay = true; DisplayInDataBox = true; DrawOnPricePanel = true; DrawHorizontalGridLines = true; DrawVerticalGridLines = true; PaintPriceMarkers = true; ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right; //Disable this property if your indicator requires custom values that cumulate with each new market data event. //See Help Guide for additional information. IsSuspendedWhileInactive = true; FileName = @"IBandExt.csv"; pathForIB = NinjaTrader.Core.Globals.UserDataDir + FileName; LineWeight = 2; Opcaity = 20; RectangleCOlor = Brushes.DimGray; TextColor = Brushes.DimGray; IBHighColor = Brushes.DimGray; IBLowColor = Brushes.DimGray; IBextColor = Brushes.DimGray; YestHighColor = Brushes.Red; YestLowColor = Brushes.DodgerBlue; RTHopen = DateTime.Parse("06:31", System.Globalization.CultureInfo.InvariantCulture); IB = DateTime.Parse("07:30", System.Globalization.CultureInfo.InvariantCulture); RTHclose = DateTime.Parse("13:00", System.Globalization.CultureInfo.InvariantCulture); AddPlot(Brushes.Orange, "IBhigh"); AddPlot(Brushes.Orange, "IBLow"); AddPlot(Brushes.Orange, "IBUpper"); AddPlot(Brushes.Orange, "IBLower"); AddPlot(Brushes.Orange, "YestHigh"); AddPlot(Brushes.Orange, "YestLow"); } else if (State == State.Configure) { startTime = long.Parse(RTHopen.ToString("HHmmss")); endTime = long.Parse(RTHclose.ToString("HHmmss")); ibTime = long.Parse(IB.ToString("HHmmss")); ClearOutputWindow(); } }