Skip to content

EnvironmentType

enum cAlgo.API Since 5.2

DesktopCLICloud

Represents the different environments where an algo can run.

Definition

public enum EnvironmentType

Namespace: cAlgo.API · Group: Application

Examples

Print("Current EnvironmentType is: {0}", Application.EnvironmentType);

if (Application.EnvironmentType == EnvironmentType.Desktop)
    Chart.DrawStaticText("environment", "Running on cTrader Desktop", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Gray);
api.Print(f"Current EnvironmentType is: {api.Application.EnvironmentType}")

if api.Application.EnvironmentType == EnvironmentType.Desktop:
    api.Chart.DrawStaticText("environment", "Running on cTrader Desktop", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Gray)

Values

Name Value Description
Desktop 0 Represents the Desktop environment.
Cloud 1 Represents the Cloud environment where algos can run.
CLI 2 Represents the Command Line Interface (CLI) environment.

See also