Skip to content

Plugin.AlgoRegistry

property · Plugin · cAlgo.API

DesktopCLICloud

Provides access to installed Algorithms.

Environment behaviour

CLI — not supported. Plugins cannot run in the CLI: ctrader-cli runs cBots only.

Cloud — not supported. Plugins cannot run in the cloud: it runs cBots only.

Definition

public AlgoRegistry AlgoRegistry {get;}
api.AlgoRegistry: AlgoRegistry

Returns AlgoRegistry

Examples

Print("Installed algos: {0}, cBots: {1}", AlgoRegistry.Count, AlgoRegistry.GetCount(AlgoKind.Robot));
if (AlgoRegistry.Exists("Sample Trend cBot", AlgoKind.Robot))
    Print("Sample Trend cBot is installed");
api.Print(f"Installed algos: {api.AlgoRegistry.Count}, cBots: {api.AlgoRegistry.GetCount(AlgoKind.Robot)}")
if api.AlgoRegistry.Exists("Sample Trend cBot", AlgoKind.Robot):
    api.Print("Sample Trend cBot is installed")