RiskRule
StockSharp.Algo.Risk
基本风险规则。
实现: IRiskRule, IAsyncPersistable, INotifyPropertyChanged
构造函数
属性
方法
LoadAsync
public virtual Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = riskRule.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.
返回值: A task that represents the asynchronous load operation.
ProcessMessage
public abstract bool ProcessMessage(Message message)
result = riskRule.ProcessMessage(message)
要处理用于交易延迟计算的信件。 接受OrderRegisterMessage、 OrderReplaceMessage、 OrderCancelMessage 和 ExecutionMessage 类型的信件 。
- message
- 传言.
返回值: 交易延迟。 如果无法计算延迟, 将会返回 。
SaveAsync
public virtual Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = riskRule.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.
返回值: A task that represents the asynchronous save operation.