RiskManager
StockSharp.Algo.Risk
风险控制经理人
继承自: BaseLogReceiver
实现: IRiskManager, ILogSource, IDisposable, IAsyncPersistable
构造函数
属性
方法
CloneAsync
public ValueTask<IRiskManager> CloneAsync(CancellationToken cancellationToken)
result = riskManager.CloneAsync(cancellationToken)
Create a copy of the manager.
- cancellationToken
- CancellationToken
返回值: 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.
返回值: A task that represents the asynchronous load operation.
ProcessRules
public IEnumerable<IRiskRule> ProcessRules(Message message)
result = riskManager.ProcessRules(message)
处理贸易信息。
- message
- 通商信息.
返回值: 规则列表,由消息激活.
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.
返回值: A task that represents the asynchronous save operation.