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

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

# CustomTimeFrameBarsUnloadedEventArgs.CustomBars

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

## CustomBars

Gets custom bars that was unloaded.

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
customTimeFrameBarsUnloadedEventArgs.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.BarsUnloaded += OnCustomTimeFrameBarsUnloaded;
}

private void OnCustomTimeFrameBarsUnloaded(CustomTimeFrameBarsUnloadedEventArgs args)
{
    args.CustomTimeFrame.RemoveBars(args.CustomBars.Symbol);
    Print("Removed unloaded bars of {0}", args.CustomBars.Symbol.Name);
}
```

Python:

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

def on_custom_time_frame_bars_unloaded(self, args):
    args.CustomTimeFrame.RemoveBars(args.CustomBars.Symbol)
    api.Print(f"Removed unloaded bars of {args.CustomBars.Symbol.Name}")
```

