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

# IsAttachedToNinjaScript

## Definition

Indicates if the drawing tool is currently **attached to** a NinjaScript object (such an indicator or a strategy).

## Property Value

A bool value which when true if the drawing tool is attached to a NinjaScript object; otherwise false. This property is read-only.

## Syntax

`IsAttachedToNinjaScript`

## Examples

```csharp
public override void OnMouseMove(ChartControl chartControl, ChartPanel chartPanel, ChartScale chartScale, ChartAnchor dataPoint)
{
    // do not interact if drawn by an indicator or strategy
    if (IsAttachedToNinjaScript)
        return;
}
```