Skip to content

AlgoParameterType

Summary

Represents the different types of algorithm parameters.

Signature

1
public enum AlgoParameterType

Namespace

cAlgo.API

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 [Robot(AccessRights = AccessRights.None)]
 public 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}");
         }
     }
 }
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 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}")

Fields

Integer

Summary

Represents a parameter of type int.

Signature

1
AlgoParameterType.Integer;

Return Value

AlgoParameterType

Double

Summary

Represents a parameter of type double.

Signature

1
AlgoParameterType.Double;

Return Value

AlgoParameterType

Boolean

Summary

Represents a parameter of type bool.

Signature

1
AlgoParameterType.Boolean;

Return Value

AlgoParameterType

String

Summary

Represents a parameter of type string.

Signature

1
AlgoParameterType.String;

Return Value

AlgoParameterType

Enum

Summary

Represents a parameter of type enum.

Signature

1
AlgoParameterType.Enum;

Return Value

AlgoParameterType

DataSeries

Summary

Represents a parameter of type DataSeries.

Signature

1
AlgoParameterType.DataSeries;

Return Value

AlgoParameterType

Color

Summary

Represents a parameter of type Color.

Signature

1
AlgoParameterType.Color;

Return Value

AlgoParameterType

TimeFrame

Summary

Represents a parameter of type TimeFrame.

Signature

1
AlgoParameterType.TimeFrame;

Return Value

AlgoParameterType

Symbol

Summary

Represents a parameter of type Symbol.

Signature

1
AlgoParameterType.Symbol;

Return Value

AlgoParameterType

DateTime

Summary

Represents a parameter of type DateTime.

Signature

1
AlgoParameterType.DateTime;

Return Value

AlgoParameterType

DateOnly

Summary

Represents a parameter of type DateOnly.

Signature

1
AlgoParameterType.DateOnly;

Return Value

AlgoParameterType

TimeSpan

Summary

Represents a parameter of type TimeSpan.

Signature

1
AlgoParameterType.TimeSpan;

Return Value

AlgoParameterType

MultiEnum

Summary

Represents a parameter of type MultiEnum.

Signature

1
AlgoParameterType.MultiEnum;

Return Value

AlgoParameterType

MultiSymbol

Summary

Represents a parameter of type MultiSymbol.

Signature

1
AlgoParameterType.MultiSymbol;

Return Value

AlgoParameterType

MultiTimeFrame

Summary

Represents a parameter of type MultiTimeFrame.

Signature

1
AlgoParameterType.MultiTimeFrame;

Return Value

AlgoParameterType