BacktestingSettings.Commission
property · BacktestingSettings · cAlgo.API Since 5.10
DesktopCLICloud
Gets or sets the commission value, it is interpreted based on the CommissionType property value. It is ignored when ApplyCommissionAutomatically is set to true. The default value is 0.
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 double Commission {get; set;}
backtestingSettings.Commission: float
Returns double
Examples
var settings = new BacktestingSettings
{
Commission = 30,
CommissionType = SymbolCommissionType.UsdPerMillionUsdVolume
};
Print("Commission: {0} ({1})", settings.Commission, settings.CommissionType);
settings = BacktestingSettings()
settings.Commission = 30
settings.CommissionType = SymbolCommissionType.UsdPerMillionUsdVolume
api.Print(f"Commission: {settings.Commission} ({settings.CommissionType})")