ChartTemplateRobots
interface cAlgo.API Since 5.6
DesktopCLICloud
The interface representing a chart template robots instances collection.
Environment behaviour
Cloud — not supported. Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.Robots).
Definition
public interface ChartTemplateRobots
Namespace: cAlgo.API · Group: Templates
Examples
using cAlgo.API;
namespace cAlgo.Robots;
public partial class ChartTemplate : Robot
{
protected override void OnStart()
{
var template = ChartTemplates.Get("Template Name");
if (template is null)
{
Print("Template not found");
return;
}
template.Robots.Add("Sample Break Even", 655732, 5, 5);
}
}
import clr
clr.AddReference("cAlgo.API")
# Import cAlgo API types
from cAlgo.API import *
# Import trading wrapper functions
from robot_wrapper import *
class Test():
def on_start(self):
template = api.ChartTemplates.Get("Template Name")
if template is None:
print("Template not found")
return
template.Robots.Add("Sample Break Even", 655732, 5, 5)
{
"AccessRights": "None",
"AddIndicators": true
}
Methods
| Name | Description |
|---|---|
Add 2 overloadsDesktopCLICloudChartTemplateRobot | Adds a new Robot instance to a chart template. |
GetDesktopCLICloudChartTemplateRobot | Returns a chart template robot by type if exists otherwise null. |
RemoveDesktopCLICloudbool | Removes a Robot instance from a chart template. |
Properties
| Name | Description |
|---|---|
CountDesktopCLICloudint | Gets the number of all Robots attached to a chart. |