I am new to Ninjascript, I am trying to draw a horizontal line at last close price:
{
//Add your custom indicator logic here.
// create custom Courier New, make it big and bold
NinjaTrader.Gui.Tools.SimpleFont myFont = new NinjaTrader.Gui.Tools.SimpleFont("Courier New", 12) { Size = 20, Bold = false };
double my_last_price =Close[0];
Draw.Line(this, "myLastLine", false, 50, Close[0], 0, Close[0], Brushes.Black, DashStyleHelper.Solid, 1);
}
Draw.HorizontalLine(this, "myTag" + 1, Close[0], Brushes.Black, DashStyleHelper.Solid, 1, true);
then there will be an horizontal line cross the whole chart window, I was hoping I am able to control the starting/ending points of the line
Not sure what I did wrong
Thanks so much.

Comment