Line

View as Markdown

Definition

Represents an interface that exposes information regarding a Line IDrawingTool.

Methods and Properties

StartAnchorAn IDrawingTool’s ChartAnchor representing the starting point of the drawing object
EndAnchorAn IDrawingTool’s ChartAnchor representing the end point of the drawing object
StrokeA Stroke object used to draw the object

Examples

1// Instantiate a Line object
2NinjaTrader.NinjaScript.DrawingTools.Line myLine = Draw.Line(this, "tag1", false, 10, 1000, 0, 1001, Brushes.LimeGreen, DashStyleHelper.Dot, 2);
3
4// Set a new Stroke for the object
5myLine.Stroke = new Stroke(Brushes.Green, DashStyleHelper.Dash, 5);

To differentiate between NinjaTrader.NinjaScript.DrawingTools.Line and NinjaTrader.Gui.Line when assigning a Line object, you will need to invoke the former path explicitly, as seen in the example above.