RiskTradePriceRule
StockSharp.Algo.Risk
Risk-rule, tracking trade price.
Inherits: RiskRule
Properties
Price
public decimal Price { get; set; }
value = riskTradePriceRule.Price
riskTradePriceRule.Price = value
Trade price.
Methods
LoadAsync
public override Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = riskTradePriceRule.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.
ProcessMessage
public override bool ProcessMessage(Message message)
result = riskTradePriceRule.ProcessMessage(message)
To process the trade message.
- message
- The trade message.
Returns: , if the rule is activated, otherwise, .
SaveAsync
public override Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = riskTradePriceRule.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.