Skip to content

ChartContainers.ContainersRemoved

event · ChartContainers · cAlgo.API

DesktopCLICloud

Occurs when containers are removed.

Environment behaviour

CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.

Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.

Definition

event Action<ChartContainersRemovedEventArgs> ContainersRemoved;
chartContainers.ContainersRemoved += handler  # handler(obj: ChartContainersRemovedEventArgs)

Examples

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);
}
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}")