ToChartString()

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Common > Bars >

ToChartString()

Previous page Return to chapter overview Next page

Definition

Returns the bars series as a formatted string, including the Instrument.FullName, BarsPeriod Value, and BarsPeriodType name.

 

Note:  To obtain a return value which matches the user configured ChartBars Label property, please see the ChartBars.ToChartString() method

 

 

Syntax

Bars.ToChartString()

 

Return Value

A string value that represents the bars series

 

Parameters

This method does not accept any parameters

 

Examples

ns

protected override void OnBarUpdate()
{
  // print the chart string on start up
  if(CurrentBar == 0)
    Print(Bars.ToChartString()); // ES 09-15 (60 Minute)      
}