Class CommissionRule
- Namespace
- StockSharp.Algo.Commissions
- Assembly
- StockSharp.Algo.dll
The commission calculating rule.
[DataContract]
public abstract class CommissionRule : NotifiableObject, INotifyPropertyChangedEx, INotifyPropertyChanged, INotifyPropertyChanging, ICommissionRule, IPersistable
- Inheritance
-
CommissionRule
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
CommissionRule()
Initialize CommissionRule.
protected CommissionRule()
Properties
Title
Title.
[Browsable(false)]
public string Title { get; }
Property Value
Value
Commission value.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Commission", Description = "CommissionValue", GroupName = "General")]
public Unit Value { get; set; }
Property Value
Methods
GetTitle()
Get title.
protected virtual string GetTitle()
Returns
GetValue(decimal?, decimal?)
Get commission value using price and volume. For percent units, uses turnover (price * volume). Absolute units return the absolute value.
protected decimal? GetValue(decimal? price, decimal? volume)
Parameters
Returns
- decimal?
Commission value or null if cannot be calculated.
Load(SettingsStorage)
Load settings.
public virtual void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
Process(ExecutionMessage)
To calculate commission.
public abstract decimal? Process(ExecutionMessage message)
Parameters
message
ExecutionMessageThe message containing the information about the order or own trade.
Returns
Reset()
To reset the state.
public virtual void Reset()
Save(SettingsStorage)
Save settings.
public virtual void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
UpdateTitle()
Update title.
protected void UpdateTitle()