Skip to content

AlgoInstanceParameters

Summary

Represents the collection of all the parameters of an indicator or Robot.

Signature

1
public abstract interface AlgoInstanceParameters

Namespace

cAlgo.API

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 [Robot(AccessRights = AccessRights.None)]
 public class Test : Robot
 {
     protected override void OnStart()
     {
         var chartIndicator = Chart.Indicators.Add("Simple Moving Average");
         foreach (var parameter in chartIndicator.Parameters)
         {
             Print($"Name: {parameter.Name} | DisplayName: {parameter.DisplayName} | Value: {parameter.Value} | Type: {parameter.Type}");
         }
     }
 }
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 [Robot(AccessRights = AccessRights.None)]
 public class Test : Robot
 {
     protected override void OnStart()
     {
         var chartRobot = Chart.Robots.Add("Sample Break Even");
         foreach (var parameter in chartRobot.Parameters)
         {
             Print($"Name: {parameter.Name} | DisplayName: {parameter.DisplayName} | Value: {parameter.Value} | Type: {parameter.Type}");
         }
     }
 }
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 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):
         chartIndicator = api.Chart.Indicators.Add("Simple Moving Average")
         for parameter in chartIndicator.Parameters:
             print(f"Name: {parameter.Name} | DisplayName: {parameter.DisplayName} | Value: {parameter.Value} | Type: {parameter.Type}")
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 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):
         chartRobot = api.Chart.Robots.Add("Sample Break Even")
         for parameter in chartRobot.Parameters:
             print(f"Name: {parameter.Name} | DisplayName: {parameter.DisplayName} | Value: {parameter.Value} | Type: {parameter.Type}")

Properties

Item

Signature

1
public abstract AlgoInstanceParameter Item {get;}

Return Value

AlgoInstanceParameter

Item

Signature

1
public abstract AlgoInstanceParameter Item {get;}

Return Value

AlgoInstanceParameter

Count

Summary

Gets the number of parameters.

Signature

1
public abstract int Count {get;}

Return Value

int