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

# DrawingTool

## Definition

The **DrawingTool** object which owns a chart anchor.

## Property Value

A **IDrawingTool** object representing the owner of the chart anchor.

## Syntax

`\<chartanchor\>.DrawingTool`

## Examples

```csharp
protected override void OnStateChange()
{
     if (State == State.SetDefaults)
     {   
						Name = "SampleDrawingTool";       
						MyAnchor = new ChartAnchor();
						MyAnchor.DrawingTool = this; // NinjaTrader.NinjaScript.DrawingTools.SampleDrawingTool
			}
     else if (State == State.Configure)
     {

     }
}
```