AccessRights
enum cAlgo.API
DesktopCLICloud
cBots and Indicators Access Rights.
Definition
public enum AccessRights
Namespace: cAlgo.API · Group: Application
Examples
using cAlgo.API;
namespace cAlgo
{
// The AccessRights key of config.json sets the access rights of a cBot, an indicator or a plugin
// The default value is None, which means your indicator/cBot will not access anything outside
// like files, network, windows registry, etc
// If you try to access any of aforementioned resources you will see an access right error on
// cTrader automate logs tab if your indicator/cBot access rights were not enough.
// The FullAccess gives you access to everything, it is like executing a .NET standalone app
// on a Windows machine.
// The AccessRights allows cTrader to notify the user of your indicator/cBot that it will
// access which resources on his system, so he can decide to allow it or not
public partial class AccessRightSample : Indicator
{
protected override void Initialize()
{
}
public override void Calculate(int index)
{
}
}
}
class AccessRightSample():
def initialize(self):
api.Print(f"Running in {api.RunningMode} mode")
{
"AccessRights": "FullAccess",
"TimeZone": "UTC",
"IsOverlay": false
}
Values
| Name | Value | Description |
|---|---|---|
None | 0 | Algorithm doesn’t require any access rights. |
FileSystem | 1 | Access to file system. |
Internet | 2 | Access to Internet or other networks. |
Registry | 4 | Access to windows registry. |
FullAccess | 1073741824 | The unlimited access rights. |