---
id: "P:cAlgo.API.Internals.Algo.RunningMode"
kind: "property"
type: "T:cAlgo.API.Internals.Algo"
url: "https://help.ctrader.com/ctrader-algo/references/General/Algo/RunningMode/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# Algo.RunningMode

Member of [Algo](https://help.ctrader.com/ctrader-algo/references/General/Algo/index.md).

## RunningMode

Defines if a cBot is running in real time, in the silent backtesting mode, in the visual backtesting mode, or in the optimization mode.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public RunningMode RunningMode {get;}
```

Python:

```python
api.RunningMode: RunningMode
```

### Returns

`RunningMode` — 

### Examples

C#:

```csharp
Print("Running mode: {0}", RunningMode);
if (RunningMode == RunningMode.Optimization)
    Print("Optimization pass, chart drawings are skipped");
```

Python:

```python
api.Print(f"Running mode: {api.RunningMode}")
if api.RunningMode == RunningMode.Optimization:
    api.Print("Optimization pass, chart drawings are skipped")
```

