CommissionRule

StockSharp.Algo.Commissions

計算ルールの手数料。

継承元: NotifiableObject

実装: ICommissionRule, IAsyncPersistable

コンストラクター

CommissionRule
protected CommissionRule()
commissionRule = CommissionRule()

Initialize CommissionRule.

プロパティ

Min
public decimal Min { get; set; }
value = commissionRule.Min
commissionRule.Min = value

Lower bound on a charge this rule produces. Zero means no bound.

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

タイトル。

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

パラメータ値。

メソッド

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

同期スコープを入力します。

戻り値: スコープ

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

タイトルを取得

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

価格とボリュームを使用して手数料値を取得します。 パーセント単位では、売上高(価格 * ボリューム)を使用します。 絶対単位は、絶対値を返します。

price
価格ベース(注文または取引)。
volume
ボリュームベース(注文または取引)。

戻り値: 計算できない場合は、コミッション値またはnull値。

LoadAsync
public virtual Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = commissionRule.LoadAsync(storage, cancellationToken)

Load settings.

storage
Settings storage.
cancellationToken
CancellationToken

戻り値: Task

OnProcessAsync
protected abstract ValueTask<decimal?> OnProcessAsync(ExecutionMessage message, CancellationToken cancellationToken)
result = commissionRule.OnProcessAsync(message, cancellationToken)

To calculate commission, before Min is applied.

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

戻り値: The commission. If the commission cannot be calculated then will be returned.

ProcessAsync
public ValueTask<decimal?> ProcessAsync(ExecutionMessage message, CancellationToken cancellationToken)
result = commissionRule.ProcessAsync(message, cancellationToken)

To calculate commission.

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

戻り値: The commission. If the commission cannot be calculated then will be returned.

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

リセット状態。

SaveAsync
public virtual Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = commissionRule.SaveAsync(storage, cancellationToken)

Save settings.

storage
Settings storage.
cancellationToken
CancellationToken

戻り値: Task

UpdateTitle
protected void UpdateTitle()
commissionRule.UpdateTitle()

タイトルを更新します。