Skip to content

ChartRobots.Remove

method · ChartRobots · cAlgo.API

DesktopCLICloud

Removes a Robot instance from a chart.

Environment behaviour

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

Definition

bool Remove(ChartRobot robot)
api.ChartRobots.Remove(robot: ChartRobot) -> bool

Parameters

Name C# type Python type Description
robot ChartRobot ChartRobot The ChartRobot to be removed from a chart.

Returns bool — True if remove was successful otherwise false.

Examples

var chartRobot = ChartRobots.Add("Sample Break Even");
var isRemoved = ChartRobots.Remove(chartRobot);
Print("cBot removed: {0}", isRemoved);
chartRobot = api.ChartRobots.Add("Sample Break Even")
isRemoved = api.ChartRobots.Remove(chartRobot)
api.Print(f"cBot removed: {isRemoved}")