RiskPnLRule

StockSharp.Algo.Risk

Regra de risco, localização de perda de lucro.

Herda de: RiskRule

Propriedades

PnL
public Unit PnL { get; set; }
value = riskPnLRule.PnL
riskPnLRule.PnL = value

Perda de lucro.

Métodos

GetTitle
protected override string GetTitle()
result = riskPnLRule.GetTitle()

Arranja o título.

LoadAsync
public override Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = riskPnLRule.LoadAsync(storage, cancellationToken)

Asynchronously loads the state of the object from the specified SettingsStorage.

storage
The SettingsStorage instance from which to load the data.
cancellationToken
A token to monitor for cancellation requests.

Retorna: A task that represents the asynchronous load operation.

ProcessMessage
public override bool ProcessMessage(Message message)
result = riskPnLRule.ProcessMessage(message)

Para processar a mensagem para cálculo do atraso da transação. São aceites as mensagens de tipos OrderRegisterMessage, OrderReplaceMessage, OrderCancelMessage@ e ExecutionMessage@.

message
Mensagem.

Retorna: O atraso da transação. Se for impossível calcular o atraso, será devolvido.

Reset
public override void Reset()
riskPnLRule.Reset()

Reiniciar estado.

SaveAsync
public override Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = riskPnLRule.SaveAsync(storage, cancellationToken)

Asynchronously saves the state of the object to the specified SettingsStorage.

storage
The SettingsStorage instance to which to save the data.
cancellationToken
A token to monitor for cancellation requests.

Retorna: A task that represents the asynchronous save operation.