Skip to content

ChartRobot.Stop

method · ChartRobot · cAlgo.API

DesktopCLICloud

Stops the 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

void Stop()
chartRobot.Stop() -> None

Examples

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