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

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

# CustomTimeFrameNewChartEventArgs.CustomBars

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

## CustomBars

Gets custom bars for the newly opened custom time frame 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
customTimeFrameNewChartEventArgs.CustomBars: CustomBars
```

### Returns

`CustomBars` — 

Available since cAlgo.API 5.3.

### Examples

C#:

```csharp
protected override void OnStart()
{
    var customTimeFrame = TimeFrameManager.Custom.Add("My Time Frame");
    customTimeFrame.NewChart += OnCustomTimeFrameNewChart;
}

private void OnCustomTimeFrameNewChart(CustomTimeFrameNewChartEventArgs args)
{
    var symbol = args.CustomBars.Symbol;
    args.CustomBars.AppendBar(new CustomBar(Server.Time, symbol.Bid, symbol.Bid, symbol.Bid, symbol.Bid, 0));
}
```

Python:

```python
def on_start(self):
    customTimeFrame = api.TimeFrameManager.Custom.Add("My Time Frame")
    customTimeFrame.NewChart += self.on_custom_time_frame_new_chart

def on_custom_time_frame_new_chart(self, args):
    symbol = args.CustomBars.Symbol
    args.CustomBars.AppendBar(CustomBar(api.Server.Time, symbol.Bid, symbol.Bid, symbol.Bid, symbol.Bid, 0))
```

