> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# ToChartString()

## 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

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