Skip to content

ChartTemplateAlgoInstanceParameters

interface cAlgo.API Since 5.6

DesktopCLICloud

Represents the collection of all the parameters of a chart template indicator or Robot.

Environment behaviour

Cloud — not supported. Never available in the cloud: it is only returned by members that do not work there (ChartTemplateIndicator.Parameters, ChartTemplateRobot.Parameters).

Definition

public interface ChartTemplateAlgoInstanceParameters

Namespace: cAlgo.API · Group: Templates

Examples

var template = ChartTemplates.Get("My Template");
var robot = template?.Robots.FirstOrDefault();
if (robot != null)
{
    Print("{0} has {1} parameters", robot.Type.Name, robot.Parameters.Count);
    foreach (var parameter in robot.Parameters)
        Print("{0} = {1}", parameter.Name, parameter.Value);
}
template = api.ChartTemplates.Get("My Template")
if template is not None:
    for robot in template.Robots:
        api.Print(f"{robot.Type.Name} has {robot.Parameters.Count} parameters")
        for parameter in robot.Parameters:
            api.Print(f"{parameter.Name} = {parameter.Value}")

Properties

Name Description
CountDesktopCLICloudint Gets the number of parameters.
ItemDesktopCLICloudChartTemplateAlgoInstanceParameter Gets a parameter by it is name.