---
id: "P:cAlgo.API.BacktestingSettings.ApplyCommissionAutomatically"
kind: "property"
type: "T:cAlgo.API.BacktestingSettings"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/ApplyCommissionAutomatically/"
---

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

# BacktestingSettings.ApplyCommissionAutomatically

Member of [BacktestingSettings](https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingSettings/index.md).

## ApplyCommissionAutomatically

Gets or sets a value that indicates whether the commission type and value of the backtested symbol are applied automatically. When it is set to true the Commission and CommissionType properties are ignored. The default value is false.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Available to plugins only, and plugins cannot run in the CLI.
- Cloud: Available to plugins only, and plugins cannot run in the cloud.

C#:

```csharp
public bool ApplyCommissionAutomatically {get; set;}
```

Python:

```python
backtestingSettings.ApplyCommissionAutomatically: bool
```

### Returns

`bool` — 

Available since cAlgo.API 5.10.

### Examples

C#:

```csharp
var settings = new BacktestingSettings { ApplyCommissionAutomatically = true };
Print("Use symbol commission: {0}", settings.ApplyCommissionAutomatically);
```

Python:

```python
settings = BacktestingSettings()
settings.ApplyCommissionAutomatically = True
api.Print(f"Use symbol commission: {settings.ApplyCommissionAutomatically}")
```

