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

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

# WatchlistRemovedEventArgs (class)

Occurs when a watchlist is removed from the marketwatch.

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

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

## Definition

```csharp
public class WatchlistRemovedEventArgs
```

## Examples

C#:

```csharp
using cAlgo.API;

namespace cAlgo
{
    // This sample shows how to use WatchlistRemovedEventArgs
    public partial class WatchlistRemovedEventArgsSample : Indicator
    {
        protected override void Initialize()
        {
            Watchlists.Removed += OnWatchlistsRemoved;
        }

        private void OnWatchlistsRemoved(WatchlistRemovedEventArgs obj)
        {
            Print("Watchlist {0} removed", 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.Removed += self.on_watchlists_removed

    def on_watchlists_removed(self, args):
        print(f"Watchlist {args.Watchlist.Name} removed")
```

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/WatchlistRemovedEventArgs/Watchlist/index.md)

