Table of Contents

Class CommissionRule

Namespace
StockSharp.Algo.Commissions
Assembly
StockSharp.Algo.dll

The commission calculating rule.

[DataContract]
public abstract class CommissionRule : NotifiableObject, ICommissionRule, IPersistable
Inheritance
CommissionRule
Implements
IPersistable
Derived
Extension Methods

Constructors

CommissionRule()

Initialize CommissionRule.

protected CommissionRule()

Properties

Title

Title.

[Browsable(false)]
public string Title { get; }

Property Value

string

Value

Commission value.

[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Commission", Description = "CommissionValue", GroupName = "General")]
public Unit Value { get; set; }

Property Value

Unit

Methods

GetTitle()

Get title.

protected virtual string GetTitle()

Returns

string

GetValue(decimal?)

Get result value.

protected decimal? GetValue(decimal? baseValue)

Parameters

baseValue decimal?

Base value.

Returns

decimal?

Result value.

Load(SettingsStorage)

Load settings.

public virtual void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

Process(ExecutionMessage)

To calculate commission.

public abstract decimal? Process(ExecutionMessage message)

Parameters

message ExecutionMessage

The message containing the information about the order or own trade.

Returns

decimal?

The commission. If the commission cannot be calculated then null will be returned.

Reset()

To reset the state.

public virtual void Reset()

Save(SettingsStorage)

Save settings.

public virtual void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

UpdateTitle()

Update title.

protected void UpdateTitle()