> 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 Class

## Definition

Objects derived from the **Line** class are used to characterize how an oscillator line is visually displayed (plotted) on a chart.

## Properties

| Property        | Description                                                                                                                                                                                                                                                                                                         |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Brush           | The System.Windows.Media.Brush used to construct the line ([reference](https://msdn.microsoft.com/en-us/library/system.windows.media.brushes%28v=vs.110%29.aspx))                                                                                                                                                   |
| BrushDX         | A [SharpDX.Direct2D1.Brush](/developer/desktop-sdk/references/sharpdx/sharpdx-direct2d1/sharpdx-direct2d1-brush) used to actually render the line.<br />**Note**:  To avoid and resolve access violation exceptions, please see Warning and examples remarked below                                                 |
| DashStyleDX     | A [SharpDX.Direct2D1.DashStyle](/developer/desktop-sdk/references/sharpdx/sharpdx-direct2d1/sharpdx-direct2d1-strokestyle/sharpdx-direct2d1-strokestyle-dashstyle) used to render the stroke style.<br />**Note**: To avoid and resolve access violation exceptions, please see Warning and examples remarked below |
| DashStyleHelper | A dashstyle used to construct the stroke. Possible values are:<br />**DashStyleHelper.Dash**<br />**DashStyleHelper.DashDot**<br />**DashStyleHelper.DashDotDot**<br />**DashStyleHelper.Dot**<br />**DashStyleHelper.Solid**                                                                                       |
| Name            | A **string** representing the name of the line                                                                                                                                                                                                                                                                      |
| RenderTarget    | The [RenderTarget](/developer/desktop-sdk/references/common/charts/rendering/rendertarget) drawing context used for the line.                                                                                                                                                                                       |
| StrokeStyle     | A [SharpDX.Direct2D1.StrokeStyle](/developer/desktop-sdk/references/sharpdx/sharpdx-direct2d1/sharpdx-direct2d1-strokestyle)                                                                                                                                                                                        |
| Value           | A **double** representing the value of the line                                                                                                                                                                                                                                                                     |
| Width           | A **float** representing the width in pixels                                                                                                                                                                                                                                                                        |

## Examples

See the [AddLine()](/developer/desktop-sdk/references/indicator/addline) method for examples.