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

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

# ChartContainers.ContainersAdded

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

## ContainersAdded

Occurs when new containers are added.

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<ChartContainersAddedEventArgs> ContainersAdded;
```

Python:

```python
chartContainers.ContainersAdded += handler  # handler(obj: ChartContainersAddedEventArgs)
```

### Returns

`Action<ChartContainersAddedEventArgs>` — 

### Examples

C#:

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

private void OnContainersAdded(ChartContainersAddedEventArgs args)
{
    foreach (var chartContainer in args.AddedChartContainers)
        Print("Chart container added: {0}", chartContainer.Id);
}
```

Python:

```python
def on_start(self):
    api.ChartManager.ChartContainers.ContainersAdded += self.on_containers_added

def on_containers_added(self, args):
    for chartContainer in args.AddedChartContainers:
        api.Print(f"Chart container added: {chartContainer.Id}")
```

