ChartTemplateRobots.Remove
method · ChartTemplateRobots · cAlgo.API Since 5.6
DesktopCLICloud
Removes a Robot instance from a chart template.
Environment behaviour
Cloud — not supported. Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.Robots).
Definition
bool Remove(ChartTemplateRobot chartTemplateRobot)
chartTemplateRobots.Remove(chartTemplateRobot: ChartTemplateRobot) -> bool
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
chartTemplateRobot | ChartTemplateRobot | ChartTemplateRobot | The ChartTemplateRobot to be removed from a chart template. |
Returns bool — True if remove was successful otherwise false.
Examples
var template = ChartTemplates.Get("My Template");
var robot = template?.Robots.FirstOrDefault();
if (robot != null)
Print("cBot removed from the template: {0}", template.Robots.Remove(robot));
template = api.ChartTemplates.Get("My Template")
if template is not None and template.Robots.Count > 0:
robot = list(template.Robots)[0]
api.Print(f"cBot removed from the template: {template.Robots.Remove(robot)}")