Skip to content

PluginType

Summary

Represents a plugin algorithm type.

Signature

1
public abstract interface PluginType

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("Sample Test Plugin", AlgoKind.Plugin) is PluginType pluginType)
             Print($"Name: {pluginType.Name} | Parameters #: {pluginType.Parameters.Count}");
     }
 }
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 import clr
 clr.AddReference("cAlgo.API")
 # Import cAlgo API types
 from cAlgo.API import *
 # Import trading wrapper functions
 from robot_wrapper import *
 from System import Action
 class Test():
     def on_start(self):
         algoType = api.AlgoRegistry.Get("Sample Test Plugin", AlgoKind.Plugin)
         if algoType is not None:
             pluginType = PluginType(algoType)
             print(f"Name: {pluginType.Name} | Parameters #: {pluginType.Parameters.Count}")

Properties

IsEnabled

Summary

Returns true if plugin is enabled otherwise false.

Signature

1
public abstract bool IsEnabled {get;}

Return Value

bool

Parameters

Summary

Gets collection of Plugin parameters.

Signature

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

Return Value

IReadonlyList