Skip to content

AlgoInstanceParameters

interface cAlgo.API

DesktopCLICloud

Represents the collection of all the parameters of an indicator or Robot.

Definition

public interface AlgoInstanceParameters

Namespace: cAlgo.API · Group: AlgoRegistry

Examples

Example 1

public partial class Test : Robot
{
    protected override void OnStart()
    {
        var chartIndicator = Chart.Indicators.Add("Simple Moving Average");

        foreach (var parameter in chartIndicator.Parameters)
        {
            Print($"Name: {parameter.Name} | DisplayName: {parameter.DisplayName} | Value: {parameter.Value} | Type: {parameter.Type}");
        }
    }
}
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):
        chartIndicator = api.Chart.Indicators.Add("Simple Moving Average")

        for parameter in chartIndicator.Parameters:
            print(f"Name: {parameter.Name} | DisplayName: {parameter.DisplayName} | Value: {parameter.Value} | Type: {parameter.Type}")
{
  "AccessRights": "None"
}

Example 2

public partial class Test : Robot
{
    protected override void OnStart()
    {
        var chartRobot = Chart.Robots.Add("Sample Break Even");
        foreach (var parameter in chartRobot.Parameters)
        {
            Print($"Name: {parameter.Name} | DisplayName: {parameter.DisplayName} | Value: {parameter.Value} | Type: {parameter.Type}");
        }
    }
}
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):
        chartRobot = api.Chart.Robots.Add("Sample Break Even")

        for parameter in chartRobot.Parameters:
            print(f"Name: {parameter.Name} | DisplayName: {parameter.DisplayName} | Value: {parameter.Value} | Type: {parameter.Type}")
{
  "AccessRights": "None"
}

Properties

Name Description
CountDesktopCLICloudint Gets the number of parameters.
Item 2 overloadsDesktopCLICloudAlgoInstanceParameter Gets a parameter by it is index.