When calling Draw.HorizontalLine(), you can specify a the same drawing tag to update the drawing object to a new location so another drawing object is not created. For example:
bool firstbar = true; protected override void OnBarUpdate() { if(State == State.Historical) return; if (firstbar) { Draw.HorizontalLine(this, "MyTag", Close[0], Brushes.Red); firstbar = false; } else Draw.HorizontalLine(this, "MyTag", High[0], Brushes.Green); }
Drawing (Important notes at the bottom of the page - https://ninjatrader.com/support/help...us/drawing.htm
Draw.HoriozontalLine() - https://ninjatrader.com/support/help...zontalline.htm
Let us know if you have any additional questions.
Comment