InstallationError
enum cAlgo.API Since 5.1
DesktopCLICloud
Represents the predefined algo installation errors.
Definition
public enum InstallationError
Namespace: cAlgo.API · Group: AlgoRegistry
Examples
public partial 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}");
}
}
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}")
{
"AccessRights": "None"
}
Values
| Name | Value | Description |
|---|---|---|
Forbidden | 0 | Installation error due to lack of permission by user. |
InvalidFile | 1 | Installation error due to algo file being invalid. |
FileNotFound | 2 | Installation error due to algo file not found in provided path (Only for file path based installations). |
DownloadError | 3 | Installation error due to algo file downloading error (Only for URI based installations). |
Canceled | 4 | When user cancels installation dialog. |
Unknown | 5 | Unknown or unrecognized error. |