---
id: "T:cAlgo.API.FavoriteTimeFramesAddedEventArgs"
kind: "class"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/FavoriteTimeFramesAddedEventArgs/"
---

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

# FavoriteTimeFramesAddedEventArgs (class)

Provides data for the Favorite TimeFrames Added event.

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.

## Definition

```csharp
public class FavoriteTimeFramesAddedEventArgs
```

Available since cAlgo.API 5.3.

## Examples

C#:

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

private void OnFavoriteTimeFramesAdded(FavoriteTimeFramesAddedEventArgs args)
{
    Print("Added to favorites: {0}", string.Join(", ", args.TimeFrames.Select(timeFrame => 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):
    api.Print("Added to favorites: " + ", ".join([str(timeFrame) for timeFrame in args.TimeFrames]))
```

## Properties

- `public TimeFrame[] TimeFrames {get;}` — Gets the added time frames. [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/FavoriteTimeFramesAddedEventArgs/TimeFrames/index.md)

