GetAttachedToChartBars()

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Drawing Tool >

GetAttachedToChartBars()

Previous page Return to chapter overview Next page

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.

 

Method Return Value

A ChartBars object

 

Syntax

GetAttachedToChartBars()

 

Method Parameters

This method does not accept any parameters

 

Examples

ns


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