Im trying to change a line of code in my indicator, so that it draws a dot and not an arrow... Can you help me with the code please, it is coming up with an error when I add my line... (CS1501).
My Code is as follows....
[Description("Doji bar with arrow")] public class DojiBar : Indicator { #region Variables // Wizard generated variables private double wick = 3; private double tail = 3; private double body = 1; private Color barColorUp = Color.Orange; bool both = false; // User defined variables (add any user defined variables below) #endregion /// <summary> /// This method is used to configure the indicator and is called once before any bar data is loaded. /// </summary> protected override void Initialize() { CalculateOnBarClose = true; Overlay = true; PriceTypeSupported = true; } /// <summary> /// Called on each bar update event (incoming tick) /// </summary> protected override void OnBarUpdate() { if (CurrentBar < 1) return; // Use this method for calculating your indicator values. Assign a value to each // plot below by replacing 'Close[0]' with your own formula. double body0 = Instrument.MasterInstrument.Round2TickSize(Math.Abs(Open[0] - Close[0]))/TickSize; double wick0 = Instrument.MasterInstrument.Round2TickSize(Math.Abs(High[0] - Open[0]))/TickSize; double tail0 = Instrument.MasterInstrument.Round2TickSize(Math.Abs(Close[0] - Low[0]))/TickSize; // Print(CurrentBar +" body0 "+body0+ " wick0 " + wick0 + " tail0 "+tail0); if(body0 <= body) if (both) { if (wick0 >= wick && tail0 >= tail ) DrawArrowDown("MyArrowDown"+Curre[CODE]
PlaySound(@"C:\Program Files (x86)\NinjaTrader 7\sounds\S & P.wav");
}
else
if (wick0 >= wick || tail0 >= tail )
DrawArrowDown("MyArrowDown"+CurrentBar, 0, High[0]+2* TickSize, barColorUp);
PlaySound(@"C:\Program Files (x86)\NinjaTrader 7\sounds\S & P.wav");[/CODE]
Im trying to change the line
DrawArrowDown("MyArrowDown"+CurrentBar, 0, High[0]+2* TickSize, barColorUp);
DrawDot("MyDot", true, 0, Low[0] - TickSize, Color.Red);
Comment