---
id: "M:cAlgo.API.CustomTimeFrames.Remove(cAlgo.API.CustomTimeFrame)"
kind: "method"
type: "T:cAlgo.API.CustomTimeFrames"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrames/Remove/"
---

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

# CustomTimeFrames.Remove

Member of [CustomTimeFrames](https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/Custom/CustomTimeFrames/index.md).

## Remove(CustomTimeFrame customTimeFrame)

Removes a 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
bool Remove(CustomTimeFrame customTimeFrame)
```

Python:

```python
customTimeFrames.Remove(customTimeFrame: CustomTimeFrame) -> bool
```

### Parameters

- `customTimeFrame` (`CustomTimeFrame`, Python `CustomTimeFrame`): Custom time frame

### Returns

`bool` — True if remove was successful otherwise False.

Available since cAlgo.API 5.3.

### Examples

C#:

```csharp
var customTimeFrame = TimeFrameManager.Custom.Get("My Custom TF");
if (customTimeFrame != null)
    Print("Custom time frame removed: {0}", TimeFrameManager.Custom.Remove(customTimeFrame));
```

Python:

```python
customTimeFrame = api.TimeFrameManager.Custom.Get("My Custom TF")
if customTimeFrame is not None:
    api.Print(f"Custom time frame removed: {api.TimeFrameManager.Custom.Remove(customTimeFrame)}")
```

