GetAttachedToChartBars()

View as Markdown

Definition

Returns information which relate to the underlying bars series in which the drawing tool is attached. If the drawing tool is attached to an indicator rather than a bar series, the indicator’s bars series used for input will be returned.

For drawing tools made global, this method will not be returning meaningful values - since those are not attached to a specific bars series.

Method Return Value

A ChartBars object

Syntax

GetAttachedToChartBars()

Method Parameters

This method does not accept any parameters.

Examples

1protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
2{
3 // get the attached chart bars
4 ChartBars myBars = GetAttachedToChartBars();
5
6 Print(myBars.Bars.ToChartString()); // NQ 03-15 (1 Minute)
7}