---
id: "E:cAlgo.API.ChartContainers.ContainersRemoved"
kind: "event"
type: "T:cAlgo.API.ChartContainers"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Chart/ChartContainers/ContainersRemoved/"
---

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

# ChartContainers.ContainersRemoved

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

## ContainersRemoved

Occurs when containers are removed.

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<ChartContainersRemovedEventArgs> ContainersRemoved;
```

Python:

```python
chartContainers.ContainersRemoved += handler  # handler(obj: ChartContainersRemovedEventArgs)
```

### Returns

`Action<ChartContainersRemovedEventArgs>` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    ChartManager.ChartContainers.ContainersRemoved += OnContainersRemoved;
}

private void OnContainersRemoved(ChartContainersRemovedEventArgs args)
{
    foreach (var chartContainer in args.RemovedChartContainers)
        Print("Chart container removed: {0}", chartContainer.Id);
}
```

Python:

```python
def on_start(self):
    api.ChartManager.ChartContainers.ContainersRemoved += self.on_containers_removed

def on_containers_removed(self, args):
    for chartContainer in args.RemovedChartContainers:
        api.Print(f"Chart container removed: {chartContainer.Id}")
```

