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

# AttachedTo

## Definition

An object which holds information regarding where the drawing tool is attached.

## Available Properties

| Name           | Description                                                                                                                                                                                                                                                                                           |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| AttachedToType | An enum representing the type of object the drawing tool is attached. Possible values are:<br />• Bars - The chart bars of the parent chart<br />• GlobalInstrument - The bars of an instrument across all charts<br />• Indicator - A NinjaScript indicator<br />• Strategy - A NinjaScript strategy |
| ChartObject    | A ChartObject interface such as an indicator, strategy, chart bars                                                                                                                                                                                                                                    |
| DisplayName    | A **string** value indicating the name of the object the drawing tool is attached                                                                                                                                                                                                                     |
| Instrument     | The Instrument that the drawing tool is attached                                                                                                                                                                                                                                                      |

## Syntax

`AttachedTo`

## Examples

```csharp

if (AttachedTo.AttachedToType == AttachedToType.Indicator)
   // do something

```