---
id: "T:cAlgo.API.ChartRobot"
kind: "interface"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/"
---

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

# ChartRobot (interface)

The interface representing a Robot instance attached to a chart. Provides properties that allow for accessing various information about a Robot.

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

- Cloud: Never available in the cloud: it is only returned by members that do not work there (ChartRobots, ChartRobots.Add, ChartRobots.Item and more).

## Definition

```csharp
public interface ChartRobot
```

## Examples

C#:

```csharp
using cAlgo.API;

namespace cAlgo.Robots;

public partial class TestExample : Robot
{
   protected override void OnStart()
   {
       foreach (var chartRobot in ChartRobots)
       {
            Print($"Name: {chartRobot.Name} | InstanceId: {chartRobot.InstanceId} | State: {chartRobot.State} | Type Name: {chartRobot.Type.Name}");
       }
   }
}
```

Python:

```python
import clr

clr.AddReference("cAlgo.API")

# Import cAlgo API types
from cAlgo.API import *

# Import trading wrapper functions
from robot_wrapper import *

class Test():
    def on_start(self):
        for chartRobot in api.ChartRobots:
            print(f"Name: {chartRobot.Name} | InstanceId: {chartRobot.InstanceId} | State: {chartRobot.State} | Type Name: {chartRobot.Type.Name}")
```

config.json:

```json
{
  "AccessRights": "None"
}
```

## Methods

- `void Start()` — Starts the Robot instance. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/Start/index.md)
- `void Stop()` — Stops the Robot instance. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/Stop/index.md)

## Properties

- `string InstanceId {get;}` — Gets the ID of a specific Robot instance. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/InstanceId/index.md)
- `string Name {get;}` — Gets the name of a Robot instance. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/Name/index.md)
- `AlgoInstanceParameters Parameters {get;}` — Gets the collection of Robot parameters. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/Parameters/index.md)
- `RobotState State {get;}` — Gets the current state of a Robot instance. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/State/index.md)
- `RobotType Type {get;}` — Gets the RobotType of a Robot instance. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Robots/ChartRobot/Type/index.md)

