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

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