---
id: "P:cAlgo.API.CustomSymbolNewChartEventArgs.CustomBars"
kind: "property"
type: "T:cAlgo.API.CustomSymbolNewChartEventArgs"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolNewChartEventArgs/CustomBars/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# CustomSymbolNewChartEventArgs.CustomBars

Member of [CustomSymbolNewChartEventArgs](https://help.ctrader.com/ctrader-algo/references/EventArgs/CustomSymbolNewChartEventArgs/index.md).

## CustomBars

Gets custom bars for the newly opened custom symbol chart.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Available to plugins only, and plugins cannot run in the CLI.
- Cloud: Available to plugins only, and plugins cannot run in the cloud.

C#:

```csharp
public CustomBars CustomBars {get;}
```

Python:

```python
customSymbolNewChartEventArgs.CustomBars: CustomBars
```

### Returns

`CustomBars` — 

Available since cAlgo.API 5.3.

### Examples

C#:

```csharp
protected override void OnStart()
{
    var customSymbol = CustomSymbols.Add("EURUSD.custom", Symbols.GetSymbol("EURUSD"));
    customSymbol.NewChart += OnCustomSymbolNewChart;
}

private void OnCustomSymbolNewChart(CustomSymbolNewChartEventArgs args)
{
    if (args.CustomBars == null)
        return;
    args.CustomBars.AppendBar(new CustomBar(Server.Time, 1.1, 1.2, 1.0, 1.15, 100));
}
```

Python:

```python
def on_start(self):
    customSymbol = api.CustomSymbols.Add("EURUSD.custom", api.Symbols.GetSymbol("EURUSD"))
    customSymbol.NewChart += self.on_custom_symbol_new_chart

def on_custom_symbol_new_chart(self, args):
    if args.CustomBars is None:
        return
    args.CustomBars.AppendBar(CustomBar(api.Server.Time, 1.1, 1.2, 1.0, 1.15, 100))
```

