For AI agents: a documentation index is available at the root level at /llms.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
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: • Bars - The chart bars of the parent chart • GlobalInstrument - The bars of an instrument across all charts • Indicator - A NinjaScript indicator • 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
1
if (AttachedTo.AttachedToType == AttachedToType.Indicator)