Skip to content

ChartRobots.RobotStarted

event · ChartRobots · cAlgo.API

DesktopCLICloud

Occurs when a chart Robot instance is started.

Environment behaviour

Cloud — not supported. Always empty: Count is 0, Add returns null, Remove returns false, and the events never fire.

Definition

event Action<ChartRobotStartedEventArgs> RobotStarted;
api.ChartRobots.RobotStarted += handler  # handler(obj: ChartRobotStartedEventArgs)

Examples

protected override void OnStart()
{
    ChartRobots.RobotStarted += OnRobotStarted;
}

private void OnRobotStarted(ChartRobotStartedEventArgs args)
{
    Print("cBot started: {0}", args.Robot.Name);
}
def on_start(self):
    api.ChartRobots.RobotStarted += self.on_robot_started

def on_robot_started(self, args):
    api.Print(f"cBot started: {args.Robot.Name}")