Skip to content

AlgoInstanceParameter

interface cAlgo.API

DesktopCLICloud

The interface representing an indicator / robot instance parameter. Provides properties that allow for accessing various information about an algo instance parameter.

Definition

public interface AlgoInstanceParameter

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
DisplayNameDesktopCLICloudstring Gets the display name of a parameter (shown in the 'Parameters' section of an instance).
NameDesktopCLICloudstring Gets the name of a parameter.
TypeDesktopCLICloudAlgoParameterType Gets the ALgoParameterType of a parameter.
ValueDesktopCLICloudobject Gets the value of a parameter.