IMarketRule

StockSharp.Algo

The interface of the rule, activating action at occurrence of market condition.

Implements: IDisposable

Properties

Container
public IMarketRuleContainer Container { get; set; }
value = iMarketRule.Container
iMarketRule.Container = value

The rules container.

ExclusiveRules
public ISynchronizedCollection<IMarketRule> ExclusiveRules { get; }
value = iMarketRule.ExclusiveRules

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

IsActive
public bool IsActive { get; set; }
value = iMarketRule.IsActive
iMarketRule.IsActive = value

Is the rule currently activated.

IsReady
public bool IsReady { get; }
value = iMarketRule.IsReady

Is the rule formed.

IsSuspended
public bool IsSuspended { get; set; }
value = iMarketRule.IsSuspended
iMarketRule.IsSuspended = value

Is the rule suspended.

LogLevel
public LogLevels LogLevel { get; set; }
value = iMarketRule.LogLevel
iMarketRule.LogLevel = value

The level to perform this rule logging.

Name
public string Name { get; set; }
value = iMarketRule.Name
iMarketRule.Name = value

The name of the rule.

Token
public object Token { get; }
value = iMarketRule.Token

Token-rules, it is associated with (for example, for rule ISubscriptionProvider) the order will be a token). If rule is not associated with anything, will be returned.

Methods

CanFinish
public bool CanFinish()
result = iMarketRule.CanFinish()

Can the rule be ended.

Returns: , if rule is not required any more. Otherwise, .

Do
public IMarketRule Do(Action action)
result = iMarketRule.Do(action)

To add the action, activated at occurrence of condition.

action
Action.

Returns: Rule.

Do
public IMarketRule Do(Action<object> action)
result = iMarketRule.Do(action)

To add the action, activated at occurrence of condition.

action
The action, taking a value.

Returns: Rule.

Do``1
public IMarketRule Do<TResult>(Func<TResult> action)
result = iMarketRule.Do(action)

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

action
The action, returning a result.

Returns: Rule.

Until
public IMarketRule Until(Func<bool> canFinish)
result = iMarketRule.Until(canFinish)

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

canFinish
The criteria for end of periodicity.

Returns: Rule.