AttachedTo

View as Markdown

Definition

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

Available Properties

NameDescription
AttachedToTypeAn 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
ChartObjectA ChartObject interface such as an indicator, strategy, chart bars
DisplayNameA string value indicating the name of the object the drawing tool is attached
InstrumentThe Instrument that the drawing tool is attached

Syntax

AttachedTo

Examples

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