Skip to content

RobotType

interface cAlgo.API

DesktopCLICloud

Represents a robot / cBot algorithm type.

Environment behaviour

Cloud — not supported. Never available in the cloud: it is only returned by members that do not work there (AlgoRegistry.Robots, ChartRobot.Type, ChartTemplateRobot.Type and more).

Definition

public interface RobotType

Namespace: cAlgo.API · Group: AlgoRegistry · Implements: AlgoType

Examples

public partial class TestExample : Robot
{
    protected override void OnStart()
    {
        if (AlgoRegistry.Get("Sample Break Even", AlgoKind.Robot) is RobotType robotType)
            Print($"Name: {robotType.Name} | Parameters #: {robotType.Parameters.Count}");
    }
}
import clr

clr.AddReference("cAlgo.API")

# Import cAlgo API types
from cAlgo.API import *

# Import trading wrapper functions
from robot_wrapper import *

from System import Action

class Test():
    def on_start(self):
        algoType = api.AlgoRegistry.Get("Sample Break Even", AlgoKind.Robot)
        if algoType is not None:
            robotType = RobotType(algoType)
            print(f"Name: {robotType.Name} | Parameters #: {robotType.Parameters.Count}")
{
  "AccessRights": "None"
}

Properties

Name Description
ParametersDesktopCLICloudIReadonlyList<AlgoParameter> Gets collection of Robot parameters.

Inherited members

From AlgoType: Name, AlgoKind, ProjectFilePath