Table of Contents

Class RiskRule

Namespace
StockSharp.Algo.Risk
Assembly
StockSharp.Algo.dll

Base risk-rule.

public abstract class RiskRule : BaseLogReceiver, ILogReceiver, IRiskRule, ILogSource, IDisposable, IPersistable, INotifyPropertyChanged
Inheritance
RiskRule
Implements
IPersistable
Derived
Inherited Members
Extension Methods

Constructors

RiskRule()

Initialize RiskRule.

protected RiskRule()

Properties

Action

Action.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Action", Description = "RiskRuleAction", GroupName = "General", Order = 0)]
public RiskActions Action { get; set; }

Property Value

RiskActions

Id

The unique identifier of the source.

[Browsable(false)]
public override Guid Id { get; set; }

Property Value

Guid

Name

The source name.

[Browsable(false)]
public override string Name { get; set; }

Property Value

string

Title

Header.

[Browsable(false)]
public string Title { get; }

Property Value

string

Methods

GetTitle()

Get title.

protected abstract string GetTitle()

Returns

string

Load(SettingsStorage)

Load settings.

public override void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

ProcessMessage(Message)

To process the trade message.

public abstract bool ProcessMessage(Message message)

Parameters

message Message

The trade message.

Returns

bool

true, if the rule is activated, otherwise, false.

Reset()

To reset the state.

public virtual void Reset()

Save(SettingsStorage)

Save settings.

public override void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

UpdateTitle()

Update title.

protected void UpdateTitle()