RiskManager

StockSharp.Algo.Risk

Менеджер по контролю рисков.

Наследует: BaseLogReceiver

Реализует: IRiskManager, ILogSource, IDisposable, IAsyncPersistable

Конструкторы

RiskManager
public RiskManager()
riskManager = RiskManager()

Инициализирует новый экземпляр RiskManager.

Свойства

Rules
public INotifyList<IRiskRule> Rules { get; }
value = riskManager.Rules

Перечень правил расчета комиссии.

Методы

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
Торговое сообщение.

Возвращает: Список правил, активируемых сообщением.

Reset
public virtual void Reset()
riskManager.Reset()

Сбросить состояние.

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.