---
id: "P:cAlgo.API.ChartRobotEventArgs.Robot"
kind: "property"
type: "T:cAlgo.API.ChartRobotEventArgs"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartRobotEventArgs/Robot/"
---

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

# ChartRobotEventArgs.Robot

Member of [ChartRobotEventArgs](https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartRobotEventArgs/index.md).

## Robot

Gets the `ChartRobot` that raised an event.

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

- Cloud: Never raised in the cloud: the ChartRobots events never fire there.

C#:

```csharp
public ChartRobot Robot {get;}
```

Python:

```python
chartRobotEventArgs.Robot: ChartRobot
```

### Returns

`ChartRobot` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    Chart.Robots.RobotStarted += OnChartRobotStarted;
}

private void OnChartRobotStarted(ChartRobotStartedEventArgs args)
{
    var robot = args.Robot;
    Print("Name: {0} | Instance: {1} | State: {2}", robot.Name, robot.InstanceId, robot.State);
}
```

Python:

```python
def on_start(self):
    api.Chart.Robots.RobotStarted += self.on_chart_robot_started

def on_chart_robot_started(self, args):
    robot = args.Robot
    api.Print(f"Name: {robot.Name} | Instance: {robot.InstanceId} | State: {robot.State}")
```

