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

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

# CustomTimeFrames.Get

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

## Get(string name)

Returns a custom time frame by it's name.

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
CustomTimeFrame Get(string name)
```

Python:

```python
customTimeFrames.Get(name: str) -> CustomTimeFrame | None
```

### Parameters

- `name` (`string`, Python `str`): Name of custom time frame

### Returns

`CustomTimeFrame` — CustomTimeFrame if custom time frame found otherwise null.

Available since cAlgo.API 5.3.

### Examples

C#:

```csharp
var customTimeFrame = TimeFrameManager.Custom.Get("My Custom TF");
if (customTimeFrame == null)
    Print("Custom time frame not found");
else
    Print("Found custom time frame: {0}", customTimeFrame.Description);
```

Python:

```python
customTimeFrame = api.TimeFrameManager.Custom.Get("My Custom TF")
if customTimeFrame is None:
    api.Print("Custom time frame not found")
else:
    api.Print(f"Found custom time frame: {customTimeFrame.Description}")
```

