> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# Line

## Definition

Represents an interface that exposes information regarding a Line [IDrawingTool](/developer/desktop-sdk/references/common/drawing/idrawingtool).

## Methods and Properties

| StartAnchor | An [IDrawingTool's ChartAnchor](/developer/desktop-sdk/references/common/drawing/idrawingtool) representing the starting point of the drawing object |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| EndAnchor   | An [IDrawingTool's ChartAnchor](/developer/desktop-sdk/references/common/drawing/idrawingtool) representing the end point of the drawing object      |
| Stroke      | A [Stroke](/developer/desktop-sdk/references/common/charts/stroke-class) object used to draw the object                                              |

## Examples

```csharp
// Instantiate a Line object
NinjaTrader.NinjaScript.DrawingTools.Line myLine = Draw.Line(this, "tag1", false, 10, 1000, 0, 1001, Brushes.LimeGreen, DashStyleHelper.Dot, 2);

// Set a new Stroke for the object
myLine.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.