IndicatorType
interface cAlgo.API
DesktopCLICloud
Represents an indicator algorithm type.
Definition
public interface IndicatorType
Namespace: cAlgo.API · Group: AlgoRegistry · Implements: AlgoType
Examples
public partial class TestExample : Robot
{
protected override void OnStart()
{
if (AlgoRegistry.Get("Simple Moving Average", AlgoKind.StandardIndicator) is IndicatorType smaIndicatorType)
Print($"Name: {smaIndicatorType.Name} | Parameters #: {smaIndicatorType.Parameters.Count} | Lines #: {smaIndicatorType.Lines.Count} | Bars: {smaIndicatorType.Bars.Count}");
}
}
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 not None:
smaIndicatorType = IndicatorType(indicatorType)
print(f"Name: {smaIndicatorType.Name} | Parameters #: {smaIndicatorType.Parameters.Count} | Lines #: {smaIndicatorType.Lines.Count} | Bars: {smaIndicatorType.Bars.Count}")
{
"AccessRights": "None"
}
Properties
| Name | Description |
|---|---|
BarsDesktopCLICloudIReadonlyList<IndicatorTypeBarOutput> | Gets collection of indicator bar outputs. |
LinesDesktopCLICloudIReadonlyList<IndicatorTypeLineOutput> | Gets collection of indicator line outputs. |
ParametersDesktopCLICloudIReadonlyList<AlgoParameter> | Gets collection of indicator parameters. |
Inherited members
From AlgoType: Name, AlgoKind, ProjectFilePath
Deprecated members (1)
IReadonlyList<IndicatorOutput> Outputs {get;}— Use Lines instead