Skip to content

ChartRobot

interface cAlgo.API

DesktopCLICloud

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

Environment behaviour

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

Definition

public interface ChartRobot

Namespace: cAlgo.API · Group: Robots

Examples

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}");
       }
   }
}
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}")
{
  "AccessRights": "None"
}

Methods

Name Description
StartDesktopCLICloudvoid Starts the Robot instance.
StopDesktopCLICloudvoid Stops the Robot instance.

Properties

Name Description
InstanceIdDesktopCLICloudstring Gets the ID of a specific Robot instance.
NameDesktopCLICloudstring Gets the name of a Robot instance.
ParametersDesktopCLICloudAlgoInstanceParameters Gets the collection of Robot parameters.
StateDesktopCLICloudRobotState Gets the current state of a Robot instance.
TypeDesktopCLICloudRobotType Gets the RobotType of a Robot instance.

See also