AlgoParameter
interface cAlgo.API
DesktopCLICloud
Represents an algorithm parameter.
Definition
public interface AlgoParameter
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"
}
Properties
| Name | Description |
|---|---|
DefaultValueDesktopCLICloudobject | Gets default value of the parameter. |
NameDesktopCLICloudstring | Gets Parameter name. |
TypeDesktopCLICloudAlgoParameterType | Gets parameter type. |