protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Enter the description for your new custom Indicator here."; Name = "VwapAdx"; 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; ColorBands = true; RangeColor = Brushes.DimGray; TrendColor = Brushes.DarkGoldenrod; AddPlot(RangeColor, "StdDev2"); AddPlot(RangeColor, "StdDev1"); AddPlot(RangeColor, "StdDevM1"); AddPlot(RangeColor, "StdDevM2"); } else if (State == State.Configure) { OrderFlowVWAP1 = OrderFlowVWAP(Close, NinjaTrader.NinjaScript.Indicators.VWAPResolution.Standard, Bars.TradingHours, NinjaTrader.NinjaScript.Indicators.VWAPStandardDeviations.Three, 1, 2, 3); } else if (State == State.DataLoaded) { 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(); } }