I am getting the following compilation error when trying to compile the following code:
using System.Windows.Media; using NinjaTrader.Gui.NinjaScript; using NinjaTrader.NinjaScript; namespace NinjaTraderAddOnProject {[INDENT]public class AddArrows : IndicatorRenderBase {[/INDENT][INDENT=2]protected override void OnStateChange() {[/INDENT][INDENT=3]if (State == State.SetDefaults) {[/INDENT][INDENT=4]Description = @"Add arrows"; Name = "AddArrows"; Calculate = Calculate.OnBarClose; IsOverlay = false; 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;[/INDENT][INDENT=3]} else if (State == State.Configure) { }[/INDENT][INDENT=2]} protected override void OnBarUpdate() {[/INDENT][INDENT=3]// Paints a red down arrown on a red bar if (Close[0] < Open[0]) {[/INDENT][INDENT=4]Draw.ArrowDown(this, CurrentBar.ToString(), true, 0, High[0] + TickSize, Brushes.Red);[/INDENT][INDENT=3]} // Paints a green up arrown on a greeb bar if (Open[0] < Close[0]) {[/INDENT][INDENT=4]Draw.ArrowDown(this, CurrentBar.ToString(), true, 0, High[0] + TickSize, Brushes.Green);[/INDENT][INDENT=3]}[/INDENT][INDENT=2]}[/INDENT][INDENT]}[/INDENT] }
Comment