protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Enter the description for your new custom Indicator here."; Name = "Fast Swing DX 3"; Calculate = Calculate.OnBarClose; 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; IsOverlay = true; swingPct = 0.2; AddPlot(Brushes.DarkGray, "LastHigh"); AddPlot(Brushes.DarkGray, "LastLow"); AddPlot(Brushes.Crimson, "Short"); AddPlot(Brushes.DodgerBlue, "Long"); } else if (State == State.Configure) { } else if (State == State.DataLoaded) { ClearOutputWindow(); FastPivotFinder1 = FastPivotFinder(false, false, 70, swingPct, 1); } }
protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Enter the description for your new custom Indicator here."; Name = "_MooreTech Swing 3"; Calculate = Calculate.OnBarClose; IsOverlay = true; DisplayInDataBox = true; DrawOnPricePanel = true; DrawHorizontalGridLines = true; DrawVerticalGridLines = true; PaintPriceMarkers = true; ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right; IsSuspendedWhileInactive = true; /// inputs shares = 100; swingPct = 0.005; minBarsToLastSwing = 70; enableHardStop = true; pctHardStop = 3; enablePivotStop = true; pivotStopSwingSize = 5; pivotStopPivotRange = 0.2; /// swow plots showUpCount = false; showHardStops = false; printTradesOnChart = false; printTradesSimple = false; printTradesTolog = true; sendOnlyCurrentBarToFirebase = true; } else if (State == State.Configure) { upColor = Brushes.LimeGreen; downColor = Brushes.Crimson; textColor = Brushes.Crimson; } else if (State == State.DataLoaded) { ClearOutputWindow(); Swing1 = Swing(5); // for piv stops FastPivotFinder1 = FastPivotFinder(false, false, 70, 0.005, 1); signals = new Series <int>(this, MaximumBarsLookBack.Infinite); // for starategy integration } }