Skip to content

ChartRobot.State

property · ChartRobot · cAlgo.API

DesktopCLICloud

Gets the current state of a Robot instance.

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

RobotState State {get;}
chartRobot.State: RobotState

Returns RobotState

Examples

foreach (var chartRobot in ChartRobots)
{
    if (chartRobot.State == RobotState.Running)
        Print("{0} is running", chartRobot.Name);
}
for chartRobot in api.ChartRobots:
    if chartRobot.State == RobotState.Running:
        api.Print(f"{chartRobot.Name} is running")