Skip to content

InstallationResult

Summary

The result of an algo installation.

Signature

1
public class InstallationResult

Namespace

cAlgo.API

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 [Robot(AccessRights = AccessRights.None)]
 public class TestExample : Robot
 {
     protected override void OnStart()
     {
         var result = AlgoRegistry.Install("path/to-algo-file.algo");
         if (!result.Succeeded)
             Print($"Algo installation failed with error: {result.Error}");
     }
 }
 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):
         result = api.AlgoRegistry.Install("path/to-algo-file.algo")
         if result.Succeeded == False:
             print(f"Algo installation failed with error: {result.Error}")

Properties

Succeeded

Summary

Returns True if algo installation succeeded otherwise false.

Signature

1
public bool Succeeded {get;}

Return Value

bool

Error

Summary

Returns algo installation error if algo installation failed otherwise null.

Signature

1
public InstallationError? Error {get;}

Return Value

InstallationError?