Interface IMarketRule
- Namespace
- StockSharp.Algo
- Assembly
- StockSharp.Algo.dll
The interface of the rule, activating action at occurrence of market condition.
public interface IMarketRule : IDisposable
- Inherited Members
- Extension Methods
Properties
Container
The rules container.
IMarketRuleContainer Container { get; set; }
Property Value
ExclusiveRules
Rules, opposite to given rule. They are deleted automatically at activation of this rule.
ISynchronizedCollection<IMarketRule> ExclusiveRules { get; }
Property Value
- ISynchronizedCollection<IMarketRule>
IsActive
Is the rule currently activated.
bool IsActive { get; set; }
Property Value
IsReady
Is the rule formed.
bool IsReady { get; }
Property Value
IsSuspended
Is the rule suspended.
bool IsSuspended { get; set; }
Property Value
LogLevel
The level to perform this rule logging.
LogLevels LogLevel { get; set; }
Property Value
Name
The name of the rule.
string Name { get; set; }
Property Value
Token
Token-rules, it is associated with (for example, for rule WhenRegistered(Order, ITransactionProvider) the order will be a token). If rule is not associated with anything, null will be returned.
object Token { get; }
Property Value
Methods
CanFinish()
Can the rule be ended.
bool CanFinish()
Returns
Do(Action)
To add the action, activated at occurrence of condition.
IMarketRule Do(Action action)
Parameters
action
ActionAction.
Returns
- IMarketRule
Rule.
Do(Action<object>)
To add the action, activated at occurrence of condition.
IMarketRule Do(Action<object> action)
Parameters
Returns
- IMarketRule
Rule.
Do<TResult>(Func<TResult>)
To add the action, returning result, activated at occurrence of condition.
IMarketRule Do<TResult>(Func<TResult> action)
Parameters
action
Func<TResult>The action, returning a result.
Returns
- IMarketRule
Rule.
Type Parameters
TResult
The type of returned result.
Until(Func<bool>)
To make the rule periodical (will be called until canFinish
returns true).
IMarketRule Until(Func<bool> canFinish)
Parameters
Returns
- IMarketRule
Rule.