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

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

# WatchlistAddedEventArgs (class)

Occurs when a new watchlist is added.

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

- Cloud: Never raised in the cloud: the events that pass it never fire there (Watchlists.Added).

## Definition

```csharp
public class WatchlistAddedEventArgs
```

## Examples

C#:

```csharp
using cAlgo.API;

namespace cAlgo
{
    // This sample shows how to use WatchlistAddedEventArgs
    public partial class WatchlistAddedEventArgsSample : Indicator
    {
        protected override void Initialize()
        {
            Watchlists.Added += OnWatchlistsAdded;
        }

        private void OnWatchlistsAdded(WatchlistAddedEventArgs obj)
        {
            Print("Watchlist {0} hase been added", obj.Watchlist.Name);
        }

        public override void Calculate(int index)
        {
        }
    }
}
```

Python:

```python
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def initialize(self):
        api.Watchlists.Added += self.on_watchlists_added

    def on_watchlists_added(self, args):
        print(f"Watchlist {args.Watchlist.Name} hase been added")
```

config.json:

```json
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true
}
```

## Properties

- `public Watchlist Watchlist {get;}` — Gets the watchlist. [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/WatchlistAddedEventArgs/Watchlist/index.md)

