CommissionRule

StockSharp.Algo.Commissions

La comisión calculando la regla.

Hereda de: NotifiableObject

Implementa: ICommissionRule, IAsyncPersistable

Constructores

CommissionRule
protected CommissionRule()
commissionRule = CommissionRule()

Inicializar CommissionRule.

Propiedades

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

Título.

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

El valor del parámetro.

Métodos

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

Introdúzcase el alcance de la sincronización.

Devuelve: Ámbito

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

Consigue título.

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

Obtener valor de comisión utilizando precio y volumen. Para unidades por ciento, utiliza la facturación (precio * volumen). Las unidades absolutas devuelven el valor absoluto.

price
Base de precios (orden o comercio).
volume
Base de volumen (orden o comercio).

Devuelve: Valor de la Comisión o nulo si no puede calcularse.

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

Load settings.

storage
Settings storage.
cancellationToken
CancellationToken

Devuelve: 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

Devuelve: 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

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

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

Reiniciar el estado.

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

Save settings.

storage
Settings storage.
cancellationToken
CancellationToken

Devuelve: Task

UpdateTitle
protected void UpdateTitle()
commissionRule.UpdateTitle()

Título de actualización.