CommissionRule

StockSharp.Algo.Commissions

The commission calculating rule.

Inherits: NotifiableObject

Implements: ICommissionRule, IPersistable

Constructors

CommissionRule
protected CommissionRule()
commissionRule = CommissionRule()

Initialize CommissionRule.

Properties

Title
public string Title { get; private set; }
value = commissionRule.Title
commissionRule.Title = value

Title.

Value
public Unit Value { get; set; }
value = commissionRule.Value
commissionRule.Value = value

Commission value.

Methods

EnterScope
protected Scope EnterScope()
result = commissionRule.EnterScope()

Enter sync scope.

Returns: Scope

GetTitle
protected virtual string GetTitle()
result = commissionRule.GetTitle()

Get title.

GetValue
protected decimal? GetValue(decimal? price, decimal? volume)
result = commissionRule.GetValue(price, volume)

Get commission value using price and volume. For percent units, uses turnover (price * volume). Absolute units return the absolute value.

price
Price base (order or trade).
volume
Volume base (order or trade).

Returns: Commission value or null if cannot be calculated.

Load
public virtual void Load(SettingsStorage storage)
commissionRule.Load(storage)

Load settings.

storage
Settings storage.
Process
public abstract decimal? Process(ExecutionMessage message)
result = commissionRule.Process(message)

To calculate commission.

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

Returns: The commission. If the commission cannot be calculated then will be returned.

Reset
public virtual void Reset()
commissionRule.Reset()

To reset the state.

Save
public virtual void Save(SettingsStorage storage)
commissionRule.Save(storage)

Save settings.

storage
Settings storage.
UpdateTitle
protected void UpdateTitle()
commissionRule.UpdateTitle()

Update title.