Skip to content

ChartTemplateIndicators

Summary

The interface representing a chart template indicator instances collection.

Signature

1
public abstract interface ChartTemplateIndicators

Namespace

cAlgo.API

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 using cAlgo.API;
 namespace cAlgo.Robots;
 [Robot(AccessRights = AccessRights.None, AddIndicators = true)]
 public class ChartTemplate : Robot
 {
     protected override void OnStart()
     {
         var template = ChartTemplates.Get("Template Name");
         if (template is null)
         {
             Print("Template not found");
             return;
         }
         template.Robots.Add("Sample Break Even", 655732, 5, 5);
     }
 }

Methods

Add (2)

Add (1 of 2)

Summary

Adds a new indicator to a chart template.

Signature

1
public abstract ChartTemplateIndicator Add(string name, object[] parameterValues)

Parameters

Name Type Description
name string The name of an indicator.
parameterValues object[] The indicator parameter values or an anonymous object that contains indicator parameter values.

Return Value

ChartTemplateIndicator

Add (2 of 2)

Summary

Adds a new indicator to a chart template.

Signature

1
public abstract ChartTemplateIndicator Add(IndicatorType type, object[] parameterValues)

Parameters

Name Type Description
type IndicatorType The type of Indicator, you can get IndicatorType from AlgoRegistry.
parameterValues object[] The indicator parameter values or an anonymous object that contains indicator parameter values.

Return Value

ChartTemplateIndicator

Remove

Summary

Removes an indicator from a chart template.

Signature

1
public abstract bool Remove(ChartTemplateIndicator chartTemplateIndicator)

Parameters

Name Type Description
chartTemplateIndicator ChartTemplateIndicator The ChartTemplateIndicator to be removed from a chart template.

Return Value

bool

Get

Summary

Returns a chart template indicator by type if exists otherwise null.

Signature

1
public abstract ChartTemplateIndicator Get(string id)

Parameters

Name Type Description
id string The id of Indicator, you can get.

Return Value

ChartTemplateIndicator

Properties

Count

Summary

Gets the number of all indicators attached to a chart template.

Signature

1
public abstract int Count {get;}

Return Value

int