---
id: "E:cAlgo.API.FavoriteTimeFrames.Added"
kind: "event"
type: "T:cAlgo.API.FavoriteTimeFrames"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/TimeFrame/FavoriteTimeFrames/Added/"
---

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

# FavoriteTimeFrames.Added

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

## Added

Occurs when new TimeFrames are added to favorite TimeFrames.

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
event Action<FavoriteTimeFramesAddedEventArgs> Added;
```

Python:

```python
favoriteTimeFrames.Added += handler  # handler(obj: FavoriteTimeFramesAddedEventArgs)
```

### Returns

`Action<FavoriteTimeFramesAddedEventArgs>` — 

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("Added to favorites: {0}", timeFrame.Name);
}
```

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"Added to favorites: {timeFrame.Name}")
```

