> This page is for NinjaScript.

> 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](/ninjascript/sharpdx_direct2d1_brush) used to actually render the line. **Note**:  To avoid and resolve access violation exceptions, please see Warning and examples remarked below                   |
| DashStyleDX     | A [SharpDX.Direct2D1.DashStyle](/ninjascript/sharpdx_direct2d1_strokestyle_dashstyle) used to render the stroke style. **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: **DashStyleHelper.Dash** **DashStyleHelper.DashDot** **DashStyleHelper.DashDotDot** **DashStyleHelper.Dot** **DashStyleHelper.Solid**                              |
| Name            | A **string** representing the name of the line                                                                                                                                                                                    |
| RenderTarget    | The [RenderTarget](/ninjascript/rendertarget) drawing context used for the line.                                                                                                                                                  |
| StrokeStyle     | A [SharpDX.Direct2D1.StrokeStyle](/ninjascript/sharpdx_direct2d1_strokestyle)                                                                                                                                                     |
| Value           | A **double** representing the value of the line                                                                                                                                                                                   |
| Width           | A **float** representing the width in pixels                                                                                                                                                                                      |

## Examples

See the [AddLine()](/ninjascript/addline) method for examples.