---
id: "P:cAlgo.API.Plugin.TimeFrameManager"
kind: "property"
type: "T:cAlgo.API.Plugin"
url: "https://help.ctrader.com/ctrader-algo/references/General/Plugin/TimeFrameManager/"
---

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

# Plugin.TimeFrameManager

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

## TimeFrameManager

Provides access to TimeFrames API.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Plugins cannot run in the CLI: ctrader-cli runs cBots only.
- Cloud: Plugins cannot run in the cloud: it runs cBots only.

C#:

```csharp
public TimeFrameManager TimeFrameManager {get;}
```

Python:

```python
api.TimeFrameManager: TimeFrameManager
```

### Returns

`TimeFrameManager` — 

Available since cAlgo.API 5.3.

### Examples

C#:

```csharp
TimeFrameManager.Favorite.Add(TimeFrame.Hour4);
var customTimeFrame = TimeFrameManager.Custom.Get("My Custom TF") ?? TimeFrameManager.Custom.Add("My Custom TF");
Print("Custom time frame: {0}", customTimeFrame.Name);
```

Python:

```python
api.TimeFrameManager.Favorite.Add(TimeFrame.Hour4)
customTimeFrame = api.TimeFrameManager.Custom.Get("My Custom TF")
if customTimeFrame is None:
    customTimeFrame = api.TimeFrameManager.Custom.Add("My Custom TF")
api.Print(f"Custom time frame: {customTimeFrame.Name}")
```

