Skip to content

IndicatorType

Summary

Represents an indicator algorithm type.

Signature

1
public abstract interface IndicatorType

Namespace

cAlgo.API

Examples

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

Properties

Lines

Summary

Gets collection of indicator line outputs.

Signature

1
public abstract IReadonlyList<IndicatorTypeLineOutput> Lines {get;}

Return Value

IReadonlyList

Bars

Summary

Gets collection of indicator bar outputs.

Signature

1
public abstract IReadonlyList<IndicatorTypeBarOutput> Bars {get;}

Return Value

IReadonlyList

Related Tutorials

Parameters

Summary

Gets collection of indicator parameters.

Signature

1
public abstract IReadonlyList<AlgoParameter> Parameters {get;}

Return Value

IReadonlyList