Skip to content

AlgoType

Summary

Base type for representing an algorithm.

Signature

1
public abstract interface AlgoType

Namespace

cAlgo.API

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 [Robot(AccessRights = AccessRights.None)]
 public class TestExample : Robot
 {
     protected override void OnStart()
     {
         foreach (var algo in AlgoRegistry)
         {
             Print($"Name: {algo.Name} | Kind: {algo.AlgoKind} | ProjectFilePath: {algo.ProjectFilePath}");
         }
     }
 }
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 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):
         for algo in api.AlgoRegistry:
             print(f"Name: {algo.Name} | Kind: {algo.AlgoKind} | ProjectFilePath: {algo.ProjectFilePath}")

Properties

Name

Summary

Gets algorithm name.

Signature

1
public abstract string Name {get;}

Return Value

string

AlgoKind

Summary

Gets algorithm kind.

Signature

1
public abstract AlgoKind AlgoKind {get;}

Return Value

AlgoKind

Related Tutorials

ProjectFilePath

Summary

Gets algorithm project file ".csproj" path if it has source code, otherwise null.

Signature

1
public abstract string ProjectFilePath {get;}

Return Value

string