RiskManager

StockSharp.Algo.Risk

The risks control manager.

Inherits: BaseLogReceiver

Implements: IRiskManager, ILogSource, IDisposable, IAsyncPersistable

Constructors

RiskManager
public RiskManager()
riskManager = RiskManager()

Initializes a new instance of the RiskManager.

Properties

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

Rule list.

Methods

CloneAsync
public ValueTask<IRiskManager> CloneAsync(CancellationToken cancellationToken)
result = riskManager.CloneAsync(cancellationToken)

Create a copy of the manager.

cancellationToken
CancellationToken

Returns: 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.

Returns: A task that represents the asynchronous load operation.

ProcessRules
public IEnumerable<IRiskRule> ProcessRules(Message message)
result = riskManager.ProcessRules(message)

To process the trade message.

message
The trade message.

Returns: List of rules, activated by the message.

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

To reset the state.

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.

Returns: A task that represents the asynchronous save operation.