Skip to content

ChartIndicator

interface cAlgo.API

DesktopCLICloud

The interface representing an indicator attached to a chart. Provides properties that allow for accessing various information about an indicator.

Definition

public interface ChartIndicator

Namespace: cAlgo.API · Group: Indicators

Examples

using cAlgo.API;

namespace cAlgo.Robots;

public partial class TestExample : Robot
{
   protected override void OnStart()
   {
       foreach (var chartIndicator in ChartIndicators)
       {
            Print($"Name: {chartIndicator.Name} | Type: {chartIndicator.Type} | InstanceId: {chartIndicator.InstanceId} | Bar Outputs #: {chartIndicator.BarOutputs.Count} | Line Outputs #: {chartIndicator.LineOutputs.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):
        for chartIndicator in api.ChartIndicators:
            print(f"Name: {chartIndicator.Name} | Type: {chartIndicator.Type} | InstanceId: {chartIndicator.InstanceId} | Bar Outputs #: {chartIndicator.BarOutputs.Count} | Line Outputs #: {chartIndicator.LineOutputs.Count}")
{
  "AccessRights": "None"
}

Properties

Name Description
BarOutputsDesktopCLICloudIReadonlyList<IndicatorBarOutput> Gets the IReadonlyList of indicator bar outputs.
InstanceIdDesktopCLICloudstring Gets the ID of a specific indicator instance.
LineOutputsDesktopCLICloudIReadonlyList<IndicatorLineOutput> Gets the IReadonlyList of indicator output lines.
NameDesktopCLICloudstring Gets the name of an indicator.
PanelIndexDesktopCLICloudint Gets or sets the index of the panel on which an indicator is displayed.
ParametersDesktopCLICloudAlgoInstanceParameters Gets the collection of indicator parameters.
TypeDesktopCLICloudIndicatorType Gets the IndicatorType of an indicator.
Deprecated members (1)
  • IReadonlyList<IndicatorLine> Lines {get;} — Use LineOutputs instead

See also