RiskManager
StockSharp.Algo.Risk
Der Risikokontrollmanager.
Erbt von: BaseLogReceiver
Implementiert: IRiskManager, ILogSource, IDisposable, IAsyncPersistable
Konstruktoren
RiskManager
public RiskManager()
riskManager = RiskManager()
Initialisiert eine neue Instanz von RiskManager.
Eigenschaften
Rules
public INotifyList<IRiskRule> Rules { get; }
value = riskManager.Rules
Die Liste der Provisionsberechnungsregeln.
Methoden
CloneAsync
public ValueTask<IRiskManager> CloneAsync(CancellationToken cancellationToken)
result = riskManager.CloneAsync(cancellationToken)
Create a copy of the manager.
- cancellationToken
- CancellationToken
Rückgabe: Copy.
LoadAsync
public override Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = riskManager.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.
Rückgabe: A task that represents the asynchronous load operation.
ProcessRules
public IEnumerable<IRiskRule> ProcessRules(Message message)
result = riskManager.ProcessRules(message)
Um die Handelsnachricht zu verarbeiten.
- message
- Die Handelsnachricht.
Rückgabe: Liste der Regeln, die durch die Nachricht aktiviert werden.
SaveAsync
public override Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = riskManager.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.
Rückgabe: A task that represents the asynchronous save operation.