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

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

# FavoriteTimeFramesAddedEventArgs.TimeFrames

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

## TimeFrames

Gets the added time frames.

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 TimeFrame[] TimeFrames {get;}
```

Python:

```python
favoriteTimeFramesAddedEventArgs.TimeFrames: list[TimeFrame]
```

### Returns

`TimeFrame[]` — 

Available since cAlgo.API 5.3.

### Examples

C#:

```csharp
protected override void OnStart()
{
    TimeFrameManager.Favorite.Added += OnFavoriteTimeFramesAdded;
}

private void OnFavoriteTimeFramesAdded(FavoriteTimeFramesAddedEventArgs args)
{
    foreach (var timeFrame in args.TimeFrames)
        Print("{0} is now a favorite time frame", timeFrame);
}
```

Python:

```python
def on_start(self):
    api.TimeFrameManager.Favorite.Added += self.on_favorite_time_frames_added

def on_favorite_time_frames_added(self, args):
    for timeFrame in args.TimeFrames:
        api.Print(f"{timeFrame} is now a favorite time frame")
```

