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

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

# WatchlistRenamedEventArgs (class)

Occurs when the watchlist is renamed.

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

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

## Definition

```csharp
public class WatchlistRenamedEventArgs
```

## Examples

C#:

```csharp
using cAlgo.API;

namespace cAlgo
{
    // This sample shows how to use WatchlistRenamedEventArgs
    public partial class WatchlistRenamedEventArgsSample : Indicator
    {
        protected override void Initialize()
        {
            Watchlists.WatchlistRenamed += OnWatchlistRenamed;
        }

        private void OnWatchlistRenamed(WatchlistRenamedEventArgs obj)
        {
            Print("Watchlist renamed to {0}", 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.WatchlistRenamed += self.on_watchlist_renamed

    def on_watchlist_renamed(self, args):
        print(f"Watchlist renamed to {args.Watchlist.Name}")
```

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

