---
id: "E:cAlgo.API.ChartRobots.RobotStopped"
kind: "event"
type: "T:cAlgo.API.ChartRobots"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobots/RobotStopped/"
---

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

# ChartRobots.RobotStopped

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

## RobotStopped

Occurs when a chart Robot instance is stopped.

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

- Cloud: Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire.

C#:

```csharp
event Action<ChartRobotStoppedEventArgs> RobotStopped;
```

Python:

```python
api.ChartRobots.RobotStopped += handler  # handler(obj: ChartRobotStoppedEventArgs)
```

### Returns

`Action<ChartRobotStoppedEventArgs>` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    ChartRobots.RobotStopped += OnRobotStopped;
}

private void OnRobotStopped(ChartRobotStoppedEventArgs args)
{
    Print("cBot stopped: {0}", args.Robot.Name);
}
```

Python:

```python
def on_start(self):
    api.ChartRobots.RobotStopped += self.on_robot_stopped

def on_robot_stopped(self, args):
    api.Print(f"cBot stopped: {args.Robot.Name}")
```

