Skip to content

PluginType

interface cAlgo.API

DesktopCLICloud

Represents a plugin algorithm type.

Environment behaviour

Cloud — not supported. Never available in the cloud: it is only returned by members that do not work there (AlgoRegistry.Plugins).

Definition

public interface PluginType

Namespace: cAlgo.API · Group: AlgoRegistry · Implements: AlgoType

Examples

public partial 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}");
    }
}
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}")
{
  "AccessRights": "None"
}

Properties

Name Description
IsEnabledDesktopCLICloudbool Returns true if plugin is enabled otherwise false.
ParametersDesktopCLICloudIReadonlyList<AlgoParameter> Gets collection of Plugin parameters.

Inherited members

From AlgoType: Name, AlgoKind, ProjectFilePath