ChartRobots.RobotStopped
event · ChartRobots · cAlgo.API
DesktopCLICloud
Occurs when a chart Robot instance is stopped.
Environment behaviour
Cloud — not supported. Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire.
Definition
event Action<ChartRobotStoppedEventArgs> RobotStopped;
api.ChartRobots.RobotStopped += handler # handler(obj: ChartRobotStoppedEventArgs)
Examples
protected override void OnStart()
{
ChartRobots.RobotStopped += OnRobotStopped;
}
private void OnRobotStopped(ChartRobotStoppedEventArgs args)
{
Print("cBot stopped: {0}", args.Robot.Name);
}
def on_start(self):
api.ChartRobots.RobotStopped += self.on_robot_stopped
def on_robot_stopped(self, args):
api.Print(f"cBot stopped: {args.Robot.Name}")