MarketRule

StockSharp.Algo

The rule, activating action at market condition occurrence.

继承自: BaseLogReceiver

实现: IMarketRule, IDisposable

构造函数

MarketRule(T)

Initialize MarketRule.

token
Token rules.

属性

Container : IMarketRuleContainer

The rules container.

ExclusiveRules : ISynchronizedCollection<IMarketRule>

Rules, opposite to given rule. They are deleted automatically at activation of this rule.

IsActive : bool

Is the rule currently activated.

IsReady : bool

Is the rule formed.

IsSuspended : bool

Is the rule suspended.

方法

Activate(T)

To activate the rule.

arg
The value, which will be sent to processor, registered through Action{.
Activate()

To activate the rule.

Activated(Action) : MarketRule<T, T>

To add the processor, which will be called at action activation.

handler
The handler.

返回值: Rule.

Activated``1(Action<T>)

To add the processor, accepting argument from Func{, which will be called at action activation.

handler
The handler.

返回值: Rule.

CanFinish() : bool

Can the rule be ended.

返回值: , if rule is not required any more. Otherwise, .

DisposeManaged()

Release resources.

Do(Action<T>) : MarketRule<T, T>

To add the action, activated at occurrence of condition.

action
Action.

返回值: Rule.

Do(Action<MarketRule<T, T>, T>) : MarketRule<T, T>

To add the action, activated at occurrence of condition.

action
Action.

返回值: Rule.

Do(Action) : MarketRule<T, T>

To add the action, activated at occurrence of condition.

action
Action.

返回值: Rule.

Do``1(Func<MarketRule<T, T>, T, T>)

To add the action, returning result, activated at occurrence of condition.

action
The action, returning a result.

返回值: Rule.

Do``1(Func<T, T>)

To add the action, returning result, activated at occurrence of condition.

action
The action, returning a result.

返回值: Rule.

Do``1(Func<T>)

To add the action, returning result, activated at occurrence of condition.

action
The action, returning a result.

返回值: Rule.

ToString() : string

Преобразовать к строковому представлению.

返回值: Строковое представление.

Until(Func<bool>) : MarketRule<T, T>

To make the rule periodical (will be called until returns ).

canFinish
The criteria for end of periodicity.

返回值: Rule.