ToChartString()

View as Markdown

Definition

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

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

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