Skip to content

AlgoParameterType

enum cAlgo.API

DesktopCLICloud

Represents the different types of algorithm parameters.

Definition

public enum AlgoParameterType

Namespace: cAlgo.API · Group: AlgoRegistry

Examples

public partial class TestExample : Robot
{
    protected override void OnStart()
    {
        if (AlgoRegistry.Get("Simple Moving Average", AlgoKind.StandardIndicator) is not IndicatorType smaIndicatorType)
            return;

        foreach (var parameter in smaIndicatorType.Parameters)
        {
            Print($"Name: {parameter.Name} | DefaultValue: {parameter.DefaultValue} | 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):
        indicatorType = api.AlgoRegistry.Get("Simple Moving Average", AlgoKind.StandardIndicator)

        if indicatorType is None:
            return

        for parameter in IndicatorType(indicatorType).Parameters:
            print(f"Name: {parameter.Name} | DefaultValue: {parameter.DefaultValue} | Type: {parameter.Type}")
{
  "AccessRights": "None"
}

Values

Name Value Description
Integer 0 Represents a parameter of type int.
Double 1 Represents a parameter of type double.
Boolean 2 Represents a parameter of type bool.
String 3 Represents a parameter of type string.
Enum 4 Represents a parameter of type enum.
DataSeries 5 Represents a parameter of type DataSeries.
Color 6 Represents a parameter of type Color.
TimeFrame 7 Represents a parameter of type TimeFrame.
Symbol 8 Represents a parameter of type Symbol.
DateTime 9 Represents a parameter of type DateTime.
DateOnly 10 Represents a parameter of type DateOnly.
TimeSpan 11 Represents a parameter of type TimeSpan.
MultiEnum 12 Represents a parameter of type Enum[].
MultiSymbol 13 Represents a parameter of type Symbol[].
MultiTimeFrame 14 Represents a parameter of type TimeFrame[].
File 15 Represents a parameter of type File.
MultiFile 16 Represents a parameter of type MultiFile.