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

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

# CustomTimeFrameBarsUnloadedEventArgs.CustomTimeFrame

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

## CustomTimeFrame

Gets custom time frame.

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 CustomTimeFrame CustomTimeFrame {get;}
```

Python:

```python
customTimeFrameBarsUnloadedEventArgs.CustomTimeFrame: CustomTimeFrame
```

### Returns

`CustomTimeFrame` — 

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)
{
    Print("Bars unloaded for custom time frame {0} ({1})", args.CustomTimeFrame.Name, args.CustomTimeFrame.TimeFrame);
}
```

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):
    api.Print(f"Bars unloaded for custom time frame {args.CustomTimeFrame.Name} ({args.CustomTimeFrame.TimeFrame})")
```

