Skip to content

BacktestingSettings.ApplyCommissionAutomatically

property · BacktestingSettings · cAlgo.API Since 5.10

DesktopCLICloud

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.

Environment behaviour

CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.

Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.

Definition

public bool ApplyCommissionAutomatically {get; set;}
backtestingSettings.ApplyCommissionAutomatically: bool

Returns bool

Examples

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