Class MarketRuleHelper
Extension class for IMarketRule.
Namespace: StockSharp.Algo
Assembly: StockSharp.Algo.dll
Syntax
public static class MarketRuleHelper : Object
Fields
DefaultRuleContainer
The container of rules, which will be applied by default to all rules, not included into strategy.
Declaration
public static readonly IMarketRuleContainer DefaultRuleContainer
Field Value
Type | Description |
---|---|
IMarketRuleContainer |
Methods
ActiveRule(IMarketRuleContainer, IMarketRule, Func<Boolean>)
To activate the rule.
Declaration
public static void ActiveRule(this IMarketRuleContainer container, IMarketRule rule, Func<bool> process)
Parameters
Type | Name | Description |
---|---|---|
IMarketRuleContainer | container | The rules container. |
IMarketRule | rule | Rule. |
Func<Boolean> | process | The handler. |
AddRuleLog(IMarketRuleContainer, LogLevels, IMarketRule, String, Object[])
To write the message from the rule.
Declaration
public static void AddRuleLog(this IMarketRuleContainer container, LogLevels level, IMarketRule rule, string message, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
IMarketRuleContainer | container | The rules container. |
LogLevels | level | The level of the log message. |
IMarketRule | rule | Rule. |
String | message | Text message. |
Object[] | args | Text message settings. Used if a message is the format string. For details, see Format(String, Object[]). |
And(IMarketRule, IMarketRule[])
To combine rules by AND condition.
Declaration
public static IMarketRule And(this IMarketRule rule, params IMarketRule[] rules)
Parameters
Type | Name | Description |
---|---|---|
IMarketRule | rule | First rule. |
IMarketRule[] | rules | Additional rules. |
Returns
Type | Description |
---|---|
IMarketRule | Combined rule. |
And(IEnumerable<IMarketRule>)
To combine rules by AND condition.
Declaration
public static IMarketRule And(this IEnumerable<IMarketRule> rules)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IMarketRule> | rules | Rules. |
Returns
Type | Description |
---|---|
IMarketRule | Combined rule. |
And<TToken, TArg>(MarketRule<TToken, TArg>, MarketRule<TToken, TArg>[])
To combine rules by AND condition.
Declaration
public static MarketRule<TToken, TArg> And<TToken, TArg>(this MarketRule<TToken, TArg> rule, params MarketRule<TToken, TArg>[] rules)
Parameters
Type | Name | Description |
---|---|---|
MarketRule<TToken, TArg> | rule | First rule. |
MarketRule<TToken, TArg>[] | rules | Additional rules. |
Returns
Type | Description |
---|---|
MarketRule<TToken, TArg> | Combined rule. |
Type Parameters
Name | Description |
---|---|
TToken | The type of token. |
TArg | The type of argument, accepted by the rule. |
Apply(IMarketRule)
To form a rule (include IsReady).
Declaration
public static IMarketRule Apply(this IMarketRule rule)
Parameters
Type | Name | Description |
---|---|---|
IMarketRule | rule | Rule. |
Returns
Type | Description |
---|---|
IMarketRule | Rule. |
Apply(IMarketRule, IMarketRuleContainer)
To form a rule (include IsReady).
Declaration
public static IMarketRule Apply(this IMarketRule rule, IMarketRuleContainer container)
Parameters
Type | Name | Description |
---|---|---|
IMarketRule | rule | Rule. |
IMarketRuleContainer | container | The rules container. |
Returns
Type | Description |
---|---|
IMarketRule | Rule. |
Apply<TToken, TArg>(MarketRule<TToken, TArg>)
To form a rule (include IsReady).
Declaration
public static MarketRule<TToken, TArg> Apply<TToken, TArg>(this MarketRule<TToken, TArg> rule)
Parameters
Type | Name | Description |
---|---|---|
MarketRule<TToken, TArg> | rule | Rule. |
Returns
Type | Description |
---|---|
MarketRule<TToken, TArg> | Rule. |
Type Parameters
Name | Description |
---|---|
TToken | The type of token. |
TArg | The type of argument, accepted by the rule. |
Apply<TToken, TArg>(MarketRule<TToken, TArg>, IMarketRuleContainer)
To form a rule (include IsReady).
Declaration
public static MarketRule<TToken, TArg> Apply<TToken, TArg>(this MarketRule<TToken, TArg> rule, IMarketRuleContainer container)
Parameters
Type | Name | Description |
---|---|---|
MarketRule<TToken, TArg> | rule | Rule. |
IMarketRuleContainer | container | The rules container. |
Returns
Type | Description |
---|---|
MarketRule<TToken, TArg> | Rule. |
Type Parameters
Name | Description |
---|---|
TToken | The type of token. |
TArg | The type of argument, accepted by the rule. |
Changed(Position, IPositionProvider)
To create a rule for the position change event.
Declaration
public static MarketRule<Position, Position> Changed(this Position position, IPositionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Position | position | The position to be traced for the change event. |
IPositionProvider | provider | The position provider. |
Returns
Type | Description |
---|---|
MarketRule<Position, Position> | Rule. |
Exclusive(IMarketRule, IMarketRule)
To make rules mutually exclusive.
Declaration
public static void Exclusive(this IMarketRule rule1, IMarketRule rule2)
Parameters
Type | Name | Description |
---|---|---|
IMarketRule | rule1 | First rule. |
IMarketRule | rule2 | Second rule. |
Once<TRule>(TRule)
To make the rule one-time rule (will be called only once).
Declaration
public static TRule Once<TRule>(this TRule rule)
where TRule : IMarketRule
Parameters
Type | Name | Description |
---|---|---|
TRule | rule | Rule. |
Returns
Type | Description |
---|---|
TRule | Rule. |
Type Parameters
Name | Description |
---|---|
TRule | The type of the rule. |
Or(IMarketRule, IMarketRule[])
To combine rules by OR condition.
Declaration
public static IMarketRule Or(this IMarketRule rule, params IMarketRule[] rules)
Parameters
Type | Name | Description |
---|---|---|
IMarketRule | rule | First rule. |
IMarketRule[] | rules | Additional rules. |
Returns
Type | Description |
---|---|
IMarketRule | Combined rule. |
Or(IEnumerable<IMarketRule>)
To combine rules by OR condition.
Declaration
public static IMarketRule Or(this IEnumerable<IMarketRule> rules)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IMarketRule> | rules | Rules. |
Returns
Type | Description |
---|---|
IMarketRule | Combined rule. |
Or<TToken, TArg>(MarketRule<TToken, TArg>, MarketRule<TToken, TArg>[])
To combine rules by OR condition.
Declaration
public static MarketRule<TToken, TArg> Or<TToken, TArg>(this MarketRule<TToken, TArg> rule, params MarketRule<TToken, TArg>[] rules)
Parameters
Type | Name | Description |
---|---|---|
MarketRule<TToken, TArg> | rule | First rule. |
MarketRule<TToken, TArg>[] | rules | Additional rules. |
Returns
Type | Description |
---|---|
MarketRule<TToken, TArg> | Combined rule. |
Type Parameters
Name | Description |
---|---|
TToken | The type of token. |
TArg | The type of argument, accepted by the rule. |
Suspend<TRule>(TRule, Boolean)
To suspend or resume the rule.
Declaration
public static TRule Suspend<TRule>(this TRule rule, bool suspend)
where TRule : IMarketRule
Parameters
Type | Name | Description |
---|---|---|
TRule | rule | Rule. |
Boolean | suspend | true - suspend, false - resume. |
Returns
Type | Description |
---|---|
TRule | Rule. |
Type Parameters
Name | Description |
---|---|
TRule | The type of the rule. |
SuspendRules(IMarketRuleContainer, Action)
To process rules in suspended mode (for example, create several rules and start them up simultaneously). After completion of method operation all rules, attached to the container resume their activity.
Declaration
public static void SuspendRules(this IMarketRuleContainer container, Action action)
Parameters
Type | Name | Description |
---|---|---|
IMarketRuleContainer | container | The rules container. |
Action | action | The action to be processed at suspended rules. For example, to add several rules simultaneously. |
SuspendRules(Action)
To process rules in suspended mode (for example, create several rules and start them up simultaneously). After completion of method operation all rules, attached to the container resume their activity.
Declaration
public static void SuspendRules(Action action)
Parameters
Type | Name | Description |
---|---|---|
Action | action | The action to be processed at suspended rules. For example, to add several rules simultaneously. |
TryRemoveRule(IMarketRuleContainer, IMarketRule, Boolean)
To delete a rule. If a rule is executed at the time when this method is called, it will not be deleted.
Declaration
public static bool TryRemoveRule(this IMarketRuleContainer container, IMarketRule rule, bool checkCanFinish = true)
Parameters
Type | Name | Description |
---|---|---|
IMarketRuleContainer | container | The rules container. |
IMarketRule | rule | Rule. |
Boolean | checkCanFinish | To check the possibility of rule suspension. |
Returns
Type | Description |
---|---|
Boolean | true, if a rule was successfully deleted, false, if a rule cannot be currently deleted. |
TryRemoveWithExclusive(IMarketRuleContainer, IMarketRule)
To delete the rule and all opposite rules. If the rule is executed at the time when this method is called, it will not be deleted.
Declaration
public static bool TryRemoveWithExclusive(this IMarketRuleContainer container, IMarketRule rule)
Parameters
Type | Name | Description |
---|---|---|
IMarketRuleContainer | container | The rules container. |
IMarketRule | rule | Rule. |
Returns
Type | Description |
---|---|
Boolean | true, if rule was removed, otherwise, false. |
UpdateLogLevel<TRule>(TRule, LogLevels)
To set the logging level.
Declaration
public static TRule UpdateLogLevel<TRule>(this TRule rule, LogLevels level)
where TRule : IMarketRule
Parameters
Type | Name | Description |
---|---|---|
TRule | rule | Rule. |
LogLevels | level | The level, on which logging is performed. |
Returns
Type | Description |
---|---|
TRule | Rule. |
Type Parameters
Name | Description |
---|---|
TRule | The type of the rule. |
UpdateName<TRule>(TRule, String)
To assign the rule a new name Name.
Declaration
public static TRule UpdateName<TRule>(this TRule rule, string name)
where TRule : IMarketRule
Parameters
Type | Name | Description |
---|---|---|
TRule | rule | Rule. |
String | name | The rule new name. |
Returns
Type | Description |
---|---|
TRule | Rule. |
Type Parameters
Name | Description |
---|---|
TRule | The type of the rule. |
WhenAllTrades(Order, ITransactionProvider)
To create a rule for the event of all trades occurrence for the order.
Declaration
public static MarketRule<Order, IEnumerable<MyTrade>> WhenAllTrades(this Order order, ITransactionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Order | order | The order to be traced for all trades occurrence event. |
ITransactionProvider | provider | The transactional provider. |
Returns
Type | Description |
---|---|
MarketRule<Order, IEnumerable<MyTrade>> | Rule. |
WhenBestAskPriceLess(MarketDepth, Unit, IMarketDataProvider)
To create a rule for the event of the best offer decrease on a specific value.
Declaration
public static MarketRule<MarketDepth, MarketDepth> WhenBestAskPriceLess(this MarketDepth depth, Unit price, IMarketDataProvider provider = null)
Parameters
Type | Name | Description |
---|---|---|
MarketDepth | depth | The order book to be traced for the event of the best offer decrease on a specific value. |
Unit | price | The shift value. |
IMarketDataProvider | provider | The market data provider. |
Returns
Type | Description |
---|---|
MarketRule<MarketDepth, MarketDepth> | Rule. |
WhenBestAskPriceLess(Security, IMarketDataProvider, Unit)
To create a rule for the event of dropping the best offer below the specific level.
Declaration
public static MarketRule<Security, Security> WhenBestAskPriceLess(this Security security, IMarketDataProvider provider, Unit price)
Parameters
Type | Name | Description |
---|---|---|
Security | security | The instrument to be traced for the event of dropping the best offer below the specific level. |
IMarketDataProvider | provider | The market data provider. |
Unit | price | The level. If the Type type equals to Limit, specified price is set. Otherwise, shift value is specified. |
Returns
Type | Description |
---|---|
MarketRule<Security, Security> | Rule. |
WhenBestAskPriceMore(MarketDepth, Unit, IMarketDataProvider)
To create a rule for the event of the best offer increase on a specific value.
Declaration
public static MarketRule<MarketDepth, MarketDepth> WhenBestAskPriceMore(this MarketDepth depth, Unit price, IMarketDataProvider provider = null)
Parameters
Type | Name | Description |
---|---|---|
MarketDepth | depth | The order book to be traced for the event of the best offer increase on a specific value. |
Unit | price | The shift value. |
IMarketDataProvider | provider | The market data provider. |
Returns
Type | Description |
---|---|
MarketRule<MarketDepth, MarketDepth> | Rule. |
WhenBestAskPriceMore(Security, IMarketDataProvider, Unit)
To create a rule for the event of excess of the best offer of the specific level.
Declaration
public static MarketRule<Security, Security> WhenBestAskPriceMore(this Security security, IMarketDataProvider provider, Unit price)
Parameters
Type | Name | Description |
---|---|---|
Security | security | The instrument to be traced for the event of excess of the best offer of the specific level. |
IMarketDataProvider | provider | The market data provider. |
Unit | price | The level. If the Type type equals to Limit, specified price is set. Otherwise, shift value is specified. |
Returns
Type | Description |
---|---|
MarketRule<Security, Security> | Rule. |
WhenBestBidPriceLess(MarketDepth, Unit, IMarketDataProvider)
To create a rule for the event of the best bid decrease on a specific value.
Declaration
public static MarketRule<MarketDepth, MarketDepth> WhenBestBidPriceLess(this MarketDepth depth, Unit price, IMarketDataProvider provider = null)
Parameters
Type | Name | Description |
---|---|---|
MarketDepth | depth | The order book to be traced for the event of the best bid decrease on a specific value. |
Unit | price | The shift value. |
IMarketDataProvider | provider | The market data provider. |
Returns
Type | Description |
---|---|
MarketRule<MarketDepth, MarketDepth> | Rule. |
WhenBestBidPriceLess(Security, IMarketDataProvider, Unit)
To create a rule for the event of dropping the best bid below the specific level.
Declaration
public static MarketRule<Security, Security> WhenBestBidPriceLess(this Security security, IMarketDataProvider provider, Unit price)
Parameters
Type | Name | Description |
---|---|---|
Security | security | The instrument to be traced for the event of dropping the best bid below the specific level. |
IMarketDataProvider | provider | The market data provider. |
Unit | price | The level. If the Type type equals to Limit, specified price is set. Otherwise, shift value is specified. |
Returns
Type | Description |
---|---|
MarketRule<Security, Security> | Rule. |
WhenBestBidPriceMore(MarketDepth, Unit, IMarketDataProvider)
To create a rule for the event of the best bid increase on a specific value.
Declaration
public static MarketRule<MarketDepth, MarketDepth> WhenBestBidPriceMore(this MarketDepth depth, Unit price, IMarketDataProvider provider = null)
Parameters
Type | Name | Description |
---|---|---|
MarketDepth | depth | The order book to be traced for the event of the best bid increase on a specific value. |
Unit | price | The shift value. |
IMarketDataProvider | provider | The market data provider. |
Returns
Type | Description |
---|---|
MarketRule<MarketDepth, MarketDepth> | Rule. |
WhenBestBidPriceMore(Security, IMarketDataProvider, Unit)
To create a rule for the event of excess of the best bid of specific level.
Declaration
public static MarketRule<Security, Security> WhenBestBidPriceMore(this Security security, IMarketDataProvider provider, Unit price)
Parameters
Type | Name | Description |
---|---|---|
Security | security | The instrument to be traced for the event of excess of the best bid of specific level. |
IMarketDataProvider | provider | The market data provider. |
Unit | price | The level. If the Type type equals to Limit, specified price is set. Otherwise, shift value is specified. |
Returns
Type | Description |
---|---|
MarketRule<Security, Security> | Rule. |
WhenCanceled(Order, ITransactionProvider)
To create a rule for the order cancelling event.
Declaration
public static MarketRule<Order, Order> WhenCanceled(this Order order, ITransactionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Order | order | The order to be traced for cancelling event. |
ITransactionProvider | provider | The transactional provider. |
Returns
Type | Description |
---|---|
MarketRule<Order, Order> | Rule. |
WhenCancelFailed(Order, ITransactionProvider)
To create a rule for the event of unsuccessful order cancelling on exchange.
Declaration
public static MarketRule<Order, OrderFail> WhenCancelFailed(this Order order, ITransactionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Order | order | The order to be traced for unsuccessful cancelling event. |
ITransactionProvider | provider | The transactional provider. |
Returns
Type | Description |
---|---|
MarketRule<Order, OrderFail> | Rule. |
WhenCandleReceived(Subscription, ISubscriptionProvider)
To create a rule for the event of CandleReceived.
Declaration
public static MarketRule<Subscription, Candle> WhenCandleReceived(this Subscription subscription, ISubscriptionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Subscription. |
ISubscriptionProvider | provider | Subscription provider. |
Returns
Type | Description |
---|---|
MarketRule<Subscription, Candle> | Rule. |
WhenCandles(ICandleManager, CandleSeries)
To create a rule for the event of candles occurrence, change and end.
Declaration
public static MarketRule<CandleSeries, Candle> WhenCandles(this ICandleManager candleManager, CandleSeries series)
Parameters
Type | Name | Description |
---|---|---|
ICandleManager | candleManager | The candles manager. |
CandleSeries | series | Candles series to be traced for candles. |
Returns
Type | Description |
---|---|
MarketRule<CandleSeries, Candle> | Rule. |
WhenCandlesChanged(ICandleManager, CandleSeries)
To create a rule for candle change event.
Declaration
public static MarketRule<CandleSeries, Candle> WhenCandlesChanged(this ICandleManager candleManager, CandleSeries series)
Parameters
Type | Name | Description |
---|---|---|
ICandleManager | candleManager | The candles manager. |
CandleSeries | series | Candles series to be traced for changed candles. |
Returns
Type | Description |
---|---|
MarketRule<CandleSeries, Candle> | Rule. |
WhenCandlesFinished(ICandleManager, CandleSeries)
To create a rule for candles end event.
Declaration
public static MarketRule<CandleSeries, Candle> WhenCandlesFinished(this ICandleManager candleManager, CandleSeries series)
Parameters
Type | Name | Description |
---|---|---|
ICandleManager | candleManager | The candles manager. |
CandleSeries | series | Candles series to be traced for end of candle. |
Returns
Type | Description |
---|---|
MarketRule<CandleSeries, Candle> | Rule. |
WhenCandlesStarted(ICandleManager, CandleSeries)
To create a rule for the event of new candles occurrence.
Declaration
public static MarketRule<CandleSeries, Candle> WhenCandlesStarted(this ICandleManager candleManager, CandleSeries series)
Parameters
Type | Name | Description |
---|---|---|
ICandleManager | candleManager | The candles manager. |
CandleSeries | series | Candles series to be traced for new candles. |
Returns
Type | Description |
---|---|
MarketRule<CandleSeries, Candle> | Rule. |
WhenChanged(ICandleManager, Candle)
To create a rule for candle change event.
Declaration
public static MarketRule<Candle, Candle> WhenChanged(this ICandleManager candleManager, Candle candle)
Parameters
Type | Name | Description |
---|---|---|
ICandleManager | candleManager | The candles manager. |
Candle | candle | The candle to be traced for change. |
Returns
Type | Description |
---|---|
MarketRule<Candle, Candle> | Rule. |
WhenChanged(MarketDepth, IMarketDataProvider)
To create a rule for the order book change event.
Declaration
public static MarketRule<MarketDepth, MarketDepth> WhenChanged(this MarketDepth depth, IMarketDataProvider provider = null)
Parameters
Type | Name | Description |
---|---|---|
MarketDepth | depth | The order book to be traced for change event. |
IMarketDataProvider | provider | The market data provider. |
Returns
Type | Description |
---|---|
MarketRule<MarketDepth, MarketDepth> | Rule. |
WhenChanged(Order, ITransactionProvider)
To create a rule for the order change event.
Declaration
public static MarketRule<Order, Order> WhenChanged(this Order order, ITransactionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Order | order | The order to be traced for the change event. |
ITransactionProvider | provider | The transactional provider. |
Returns
Type | Description |
---|---|
MarketRule<Order, Order> | Rule. |
WhenChanged(Portfolio, IPortfolioProvider)
To create a rule for the event of change portfolio .
Declaration
public static MarketRule<Portfolio, Portfolio> WhenChanged(this Portfolio portfolio, IPortfolioProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Portfolio | portfolio | The portfolio to be traced for the event of change. |
IPortfolioProvider | provider | The provider of information about portfolios. |
Returns
Type | Description |
---|---|
MarketRule<Portfolio, Portfolio> | Rule. |
WhenChanged(Security, IMarketDataProvider)
To create a rule for the instrument change event.
Declaration
public static MarketRule<Security, Security> WhenChanged(this Security security, IMarketDataProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Security | security | The instrument to be traced for changes. |
IMarketDataProvider | provider | The market data provider. |
Returns
Type | Description |
---|---|
MarketRule<Security, Security> | Rule. |
WhenClosePriceLess(ICandleManager, Candle, Unit)
To create a rule for the event of candle closing price reduction below a specific level.
Declaration
public static MarketRule<Candle, Candle> WhenClosePriceLess(this ICandleManager candleManager, Candle candle, Unit price)
Parameters
Type | Name | Description |
---|---|---|
ICandleManager | candleManager | The candles manager. |
Candle | candle | The candle to be traced for the event of candle closing price reduction below a specific level. |
Unit | price | The level. If the Type type equals to Limit, specified price is set. Otherwise, shift value is specified. |
Returns
Type | Description |
---|---|
MarketRule<Candle, Candle> | Rule. |
WhenClosePriceMore(ICandleManager, Candle, Unit)
To create a rule for the event of candle closing price excess above a specific level.
Declaration
public static MarketRule<Candle, Candle> WhenClosePriceMore(this ICandleManager candleManager, Candle candle, Unit price)
Parameters
Type | Name | Description |
---|---|---|
ICandleManager | candleManager | The candles manager. |
Candle | candle | The candle to be traced for the event of candle closing price excess above a specific level. |
Unit | price | The level. If the Type type equals to Limit, specified price is set. Otherwise, shift value is specified. |
Returns
Type | Description |
---|---|
MarketRule<Candle, Candle> | Rule. |
WhenConnected(IConnector)
To create a rule for the event of connection established.
Declaration
public static MarketRule<IConnector, IMessageAdapter> WhenConnected(this IConnector connector)
Parameters
Type | Name | Description |
---|---|---|
IConnector | connector | The connection to be traced for state. |
Returns
Type | Description |
---|---|
MarketRule<IConnector, IMessageAdapter> | Rule. |
WhenConnectionLost(IConnector)
To create a rule for the event of connection lost.
Declaration
public static MarketRule<IConnector, Tuple<IMessageAdapter, Exception>> WhenConnectionLost(this IConnector connector)
Parameters
Type | Name | Description |
---|---|---|
IConnector | connector | The connection to be traced for state. |
Returns
Type | Description |
---|---|
MarketRule<IConnector, Tuple<IMessageAdapter, Exception>> | Rule. |
WhenCurrentCandleTotalVolumeMore(ICandleManager, CandleSeries, Unit)
To create a rule for the event of candle total volume excess above a specific level.
Declaration
public static MarketRule<CandleSeries, Candle> WhenCurrentCandleTotalVolumeMore(this ICandleManager candleManager, CandleSeries series, Unit volume)
Parameters
Type | Name | Description |
---|---|---|
ICandleManager | candleManager | The candles manager. |
CandleSeries | series | Candles series, from which a candle will be taken. |
Unit | volume | The level. If the Type type equals to Limit, specified price is set. Otherwise, shift value is specified. |
Returns
Type | Description |
---|---|
MarketRule<CandleSeries, Candle> | Rule. |
WhenDisconnected(IConnector)
To create a rule for the event of disconnection.
Declaration
public static MarketRule<IConnector, IMessageAdapter> WhenDisconnected(this IConnector connector)
Parameters
Type | Name | Description |
---|---|---|
IConnector | connector | The connection to be traced for state. |
Returns
Type | Description |
---|---|
MarketRule<IConnector, IMessageAdapter> | Rule. |
WhenEdited(Order, ITransactionProvider)
To create a rule for the order OrderEdited event.
Declaration
public static MarketRule<Order, Order> WhenEdited(this Order order, ITransactionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Order | order | The order to be traced. |
ITransactionProvider | provider | The transactional provider. |
Returns
Type | Description |
---|---|
MarketRule<Order, Order> | Rule. |
WhenEditFailed(Order, ITransactionProvider)
To create a rule for the order OrderEditFailed event.
Declaration
public static MarketRule<Order, OrderFail> WhenEditFailed(this Order order, ITransactionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Order | order | The order to be traced. |
ITransactionProvider | provider | The transactional provider. |
Returns
Type | Description |
---|---|
MarketRule<Order, OrderFail> | Rule. |
WhenFilteredMarketDepthChanged(Security, IMarketDataProvider)
To create a rule for the event of order book change by instrument.
Declaration
public static MarketRule<Security, MarketDepth> WhenFilteredMarketDepthChanged(this Security security, IMarketDataProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Security | security | The instrument to be traced for the event of order book change by instrument. |
IMarketDataProvider | provider | The market data provider. |
Returns
Type | Description |
---|---|
MarketRule<Security, MarketDepth> | Rule. |
WhenFinished(ICandleManager, Candle)
To create a rule for candle end event.
Declaration
public static MarketRule<Candle, Candle> WhenFinished(this ICandleManager candleManager, Candle candle)
Parameters
Type | Name | Description |
---|---|---|
ICandleManager | candleManager | The candles manager. |
Candle | candle | The candle to be traced for end. |
Returns
Type | Description |
---|---|
MarketRule<Candle, Candle> | Rule. |
WhenIntervalElapsed(IConnector, TimeSpan)
To create a rule for the event MarketTimeChanged, activated after expiration of interval
.
Declaration
public static MarketRule<IConnector, IConnector> WhenIntervalElapsed(this IConnector connector, TimeSpan interval)
Parameters
Type | Name | Description |
---|---|---|
IConnector | connector | Connection to the trading system. |
TimeSpan | interval | Interval. |
Returns
Type | Description |
---|---|
MarketRule<IConnector, IConnector> | Rule. |
WhenLastTradePriceLess(Security, IMarketDataProvider, Unit)
To create a rule for the event of reduction of the last trade price below the specific level.
Declaration
public static MarketRule<Security, Security> WhenLastTradePriceLess(this Security security, IMarketDataProvider provider, Unit price)
Parameters
Type | Name | Description |
---|---|---|
Security | security | The instrument to be traced for the event of reduction of the last trade price below the specific level. |
IMarketDataProvider | provider | The market data provider. |
Unit | price | The level. If the Type type equals to Limit, specified price is set. Otherwise, shift value is specified. |
Returns
Type | Description |
---|---|
MarketRule<Security, Security> | Rule. |
WhenLastTradePriceMore(Security, IMarketDataProvider, Unit)
To create a rule for the event of increase of the last trade price above the specific level.
Declaration
public static MarketRule<Security, Security> WhenLastTradePriceMore(this Security security, IMarketDataProvider provider, Unit price)
Parameters
Type | Name | Description |
---|---|---|
Security | security | The instrument to be traced for the event of increase of the last trade price above the specific level. |
IMarketDataProvider | provider | The market data provider. |
Unit | price | The level. If the Type type equals to Limit, specified price is set. Otherwise, shift value is specified. |
Returns
Type | Description |
---|---|
MarketRule<Security, Security> | Rule. |
WhenLess(Position, IPositionProvider, Unit)
To create a rule for the event of position decrease below the specific level.
Declaration
public static MarketRule<Position, Position> WhenLess(this Position position, IPositionProvider provider, Unit value)
Parameters
Type | Name | Description |
---|---|---|
Position | position | The position to be traced for the event of decrease below the specific level. |
IPositionProvider | provider | The position provider. |
Unit | value | The level. If the Type type equals to Limit, specified price is set. Otherwise, shift value is specified. |
Returns
Type | Description |
---|---|
MarketRule<Position, Position> | Rule. |
WhenLevel1Received(Subscription, ISubscriptionProvider)
To create a rule for the event of Level1Received.
Declaration
public static MarketRule<Subscription, Level1ChangeMessage> WhenLevel1Received(this Subscription subscription, ISubscriptionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Subscription. |
ISubscriptionProvider | provider | Subscription provider. |
Returns
Type | Description |
---|---|
MarketRule<Subscription, Level1ChangeMessage> | Rule. |
WhenLossMore(Order, Unit, IConnector)
To create a rule for the order's loss more on offset.
Declaration
public static MarketRule<Order, Order> WhenLossMore(this Order order, Unit profitOffset, IConnector connector)
Parameters
Type | Name | Description |
---|---|---|
Order | order | The order to be traced for loss. |
Unit | profitOffset | Loss offset. |
IConnector | connector | Connection to the trading system. |
Returns
Type | Description |
---|---|
MarketRule<Order, Order> | Rule. |
WhenLossMore(Order, Unit, ITransactionProvider, IMarketDataProvider)
To create a rule for the order's loss more on offset.
Declaration
public static MarketRule<Order, Order> WhenLossMore(this Order order, Unit profitOffset, ITransactionProvider transactionProvider, IMarketDataProvider marketDataProvider)
Parameters
Type | Name | Description |
---|---|---|
Order | order | The order to be traced for loss. |
Unit | profitOffset | Loss offset. |
ITransactionProvider | transactionProvider | The transactional provider. |
IMarketDataProvider | marketDataProvider | The market data provider. |
Returns
Type | Description |
---|---|
MarketRule<Order, Order> | Rule. |
WhenMarketDepthChanged(BasketSecurity, IMarketDataProvider)
To create a rule for the event of order book change by instruments basket.
Declaration
public static MarketRule<Security, MarketDepth> WhenMarketDepthChanged(this BasketSecurity security, IMarketDataProvider provider)
Parameters
Type | Name | Description |
---|---|---|
BasketSecurity | security | Instruments basket to be traced for the event of order books change by internal instruments. |
IMarketDataProvider | provider | The market data provider. |
Returns
Type | Description |
---|---|
MarketRule<Security, MarketDepth> | Rule. |
WhenMarketDepthChanged(Security, IMarketDataProvider)
To create a rule for the event of order book change by instrument.
Declaration
public static MarketRule<Security, MarketDepth> WhenMarketDepthChanged(this Security security, IMarketDataProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Security | security | The instrument to be traced for the event of order book change by instrument. |
IMarketDataProvider | provider | The market data provider. |
Returns
Type | Description |
---|---|
MarketRule<Security, MarketDepth> | Rule. |
WhenMarketDepthReceived(Subscription, ISubscriptionProvider)
To create a rule for the event of MarketDepthReceived.
Declaration
public static MarketRule<Subscription, MarketDepth> WhenMarketDepthReceived(this Subscription subscription, ISubscriptionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Subscription. |
ISubscriptionProvider | provider | Subscription provider. |
Returns
Type | Description |
---|---|
MarketRule<Subscription, MarketDepth> | Rule. |
WhenMatched(Order, ITransactionProvider)
To create a rule for the event of order fully matching.
Declaration
public static MarketRule<Order, Order> WhenMatched(this Order order, ITransactionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Order | order | The order to be traced for the fully matching event. |
ITransactionProvider | provider | The transactional provider. |
Returns
Type | Description |
---|---|
MarketRule<Order, Order> | Rule. |
WhenMoneyLess(Portfolio, IPortfolioProvider, Unit)
To create a rule for the event of money decrease in portfolio below the specific level.
Declaration
public static MarketRule<Portfolio, Portfolio> WhenMoneyLess(this Portfolio portfolio, IPortfolioProvider provider, Unit money)
Parameters
Type | Name | Description |
---|---|---|
Portfolio | portfolio | The portfolio to be traced for the event of money decrease below the specific level. |
IPortfolioProvider | provider | The provider of information about portfolios. |
Unit | money | The level. If the Type type equals to Limit, specified price is set. Otherwise, shift value is specified. |
Returns
Type | Description |
---|---|
MarketRule<Portfolio, Portfolio> | Rule. |
WhenMoneyMore(Portfolio, IPortfolioProvider, Unit)
To create a rule for the event of money increase in portfolio above the specific level.
Declaration
public static MarketRule<Portfolio, Portfolio> WhenMoneyMore(this Portfolio portfolio, IPortfolioProvider provider, Unit money)
Parameters
Type | Name | Description |
---|---|---|
Portfolio | portfolio | The portfolio to be traced for the event of money increase above the specific level. |
IPortfolioProvider | provider | The provider of information about portfolios. |
Unit | money | The level. If the Type type equals to Limit, specified price is set. Otherwise, shift value is specified. |
Returns
Type | Description |
---|---|
MarketRule<Portfolio, Portfolio> | Rule. |
WhenMore(Position, IPositionProvider, Unit)
To create a rule for the event of position increase above the specific level.
Declaration
public static MarketRule<Position, Position> WhenMore(this Position position, IPositionProvider provider, Unit value)
Parameters
Type | Name | Description |
---|---|---|
Position | position | The position to be traced of the event of increase above the specific level. |
IPositionProvider | provider | The position provider. |
Unit | value | The level. If the Type type equals to Limit, specified price is set. Otherwise, shift value is specified. |
Returns
Type | Description |
---|---|
MarketRule<Position, Position> | Rule. |
WhenNewMyTrade(ITransactionProvider)
To create a rule for the event of new trade occurrences.
Declaration
public static MarketRule<ITransactionProvider, MyTrade> WhenNewMyTrade(this ITransactionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
ITransactionProvider | provider | The transactional provider. |
Returns
Type | Description |
---|---|
MarketRule<ITransactionProvider, MyTrade> | Rule. |
WhenNewOrder(ITransactionProvider)
To create a rule for the event of new orders occurrences.
Declaration
public static MarketRule<ITransactionProvider, Order> WhenNewOrder(this ITransactionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
ITransactionProvider | provider | The transactional provider. |
Returns
Type | Description |
---|---|
MarketRule<ITransactionProvider, Order> | Rule. |
WhenNewOrderLogItem(Security, IMarketDataProvider)
To create a rule for the event of new notes occurrence in the orders log for instrument.
Declaration
public static MarketRule<Security, OrderLogItem> WhenNewOrderLogItem(this Security security, IMarketDataProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Security | security | The instrument to be traced for the event of new notes occurrence in the orders log. |
IMarketDataProvider | provider | The market data provider. |
Returns
Type | Description |
---|---|
MarketRule<Security, OrderLogItem> | Rule. |
WhenNewsReceived(Subscription, ISubscriptionProvider)
To create a rule for the event of NewsReceived.
Declaration
public static MarketRule<Subscription, News> WhenNewsReceived(this Subscription subscription, ISubscriptionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Subscription. |
ISubscriptionProvider | provider | Subscription provider. |
Returns
Type | Description |
---|---|
MarketRule<Subscription, News> | Rule. |
WhenNewTrade(Order, ITransactionProvider)
To create a rule for the event of trade occurrence for the order.
Declaration
public static MarketRule<Order, MyTrade> WhenNewTrade(this Order order, ITransactionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Order | order | The order to be traced for trades occurrence events. |
ITransactionProvider | provider | The transactional provider. |
Returns
Type | Description |
---|---|
MarketRule<Order, MyTrade> | Rule. |
WhenNewTrade(Security, IMarketDataProvider)
To create a rule for the event of new trade occurrence for the instrument.
Declaration
public static MarketRule<Security, Trade> WhenNewTrade(this Security security, IMarketDataProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Security | security | The instrument to be traced for new trade occurrence event. |
IMarketDataProvider | provider | The market data provider. |
Returns
Type | Description |
---|---|
MarketRule<Security, Trade> | Rule. |
WhenOrderBookReceived(Subscription, ISubscriptionProvider)
To create a rule for the event of OrderBookReceived.
Declaration
public static MarketRule<Subscription, QuoteChangeMessage> WhenOrderBookReceived(this Subscription subscription, ISubscriptionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Subscription. |
ISubscriptionProvider | provider | Subscription provider. |
Returns
Type | Description |
---|---|
MarketRule<Subscription, QuoteChangeMessage> | Rule. |
WhenOrderFailReceived(Subscription, ISubscriptionProvider, Boolean)
To create a rule for the event of OrderRegisterFailReceived or OrderCancelFailReceived.
Declaration
public static MarketRule<Subscription, OrderFail> WhenOrderFailReceived(this Subscription subscription, ISubscriptionProvider provider, bool isRegister)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Subscription. |
ISubscriptionProvider | provider | Subscription provider. |
Boolean | isRegister |
Returns
Type | Description |
---|---|
MarketRule<Subscription, OrderFail> | Rule. |
WhenOrderLogReceived(Subscription, ISubscriptionProvider)
To create a rule for the event of OrderLogItemReceived.
Declaration
public static MarketRule<Subscription, OrderLogItem> WhenOrderLogReceived(this Subscription subscription, ISubscriptionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Subscription. |
ISubscriptionProvider | provider | Subscription provider. |
Returns
Type | Description |
---|---|
MarketRule<Subscription, OrderLogItem> | Rule. |
WhenOrderReceived(Subscription, ISubscriptionProvider)
To create a rule for the event of OrderReceived.
Declaration
public static MarketRule<Subscription, Order> WhenOrderReceived(this Subscription subscription, ISubscriptionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Subscription. |
ISubscriptionProvider | provider | Subscription provider. |
Returns
Type | Description |
---|---|
MarketRule<Subscription, Order> | Rule. |
WhenOwnTradeReceived(Subscription, ISubscriptionProvider)
To create a rule for the event of OwnTradeReceived.
Declaration
public static MarketRule<Subscription, MyTrade> WhenOwnTradeReceived(this Subscription subscription, ISubscriptionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Subscription. |
ISubscriptionProvider | provider | Subscription provider. |
Returns
Type | Description |
---|---|
MarketRule<Subscription, MyTrade> | Rule. |
WhenPartiallyFinished(ICandleManager, Candle, IConnector, Decimal)
To create a rule for the event of candle partial end.
Declaration
public static MarketRule<Candle, Candle> WhenPartiallyFinished(this ICandleManager candleManager, Candle candle, IConnector connector, Decimal percent)
Parameters
Type | Name | Description |
---|---|---|
ICandleManager | candleManager | The candles manager. |
Candle | candle | The candle to be traced for partial end. |
IConnector | connector | Connection to the trading system. |
Decimal | percent | The percentage of candle completion. |
Returns
Type | Description |
---|---|
MarketRule<Candle, Candle> | Rule. |
WhenPartiallyFinishedCandles(ICandleManager, CandleSeries, IConnector, Decimal)
To create a rule for the event of candle partial end.
Declaration
public static MarketRule<CandleSeries, Candle> WhenPartiallyFinishedCandles(this ICandleManager candleManager, CandleSeries series, IConnector connector, Decimal percent)
Parameters
Type | Name | Description |
---|---|---|
ICandleManager | candleManager | The candles manager. |
CandleSeries | series | The candle series to be traced for candle partial end. |
IConnector | connector | Connection to the trading system. |
Decimal | percent | The percentage of candle completion. |
Returns
Type | Description |
---|---|
MarketRule<CandleSeries, Candle> | Rule. |
WhenPartiallyMatched(Order, ITransactionProvider)
To create a rule for the event of order partial matching.
Declaration
public static MarketRule<Order, Order> WhenPartiallyMatched(this Order order, ITransactionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Order | order | The order to be traced for partial matching event. |
ITransactionProvider | provider | The transactional provider. |
Returns
Type | Description |
---|---|
MarketRule<Order, Order> | Rule. |
WhenPositionReceived(Subscription, ISubscriptionProvider)
To create a rule for the event of PositionReceived.
Declaration
public static MarketRule<Subscription, Position> WhenPositionReceived(this Subscription subscription, ISubscriptionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Subscription. |
ISubscriptionProvider | provider | Subscription provider. |
Returns
Type | Description |
---|---|
MarketRule<Subscription, Position> | Rule. |
WhenProfitMore(Order, Unit, IConnector)
To create a rule for the order's profit more on offset.
Declaration
public static MarketRule<Order, Order> WhenProfitMore(this Order order, Unit profitOffset, IConnector connector)
Parameters
Type | Name | Description |
---|---|---|
Order | order | The order to be traced for profit. |
Unit | profitOffset | Profit offset. |
IConnector | connector | Connection to the trading system. |
Returns
Type | Description |
---|---|
MarketRule<Order, Order> | Rule. |
WhenProfitMore(Order, Unit, ITransactionProvider, IMarketDataProvider)
To create a rule for the order's profit more on offset.
Declaration
public static MarketRule<Order, Order> WhenProfitMore(this Order order, Unit profitOffset, ITransactionProvider transactionProvider, IMarketDataProvider marketDataProvider)
Parameters
Type | Name | Description |
---|---|---|
Order | order | The order to be traced for profit. |
Unit | profitOffset | Profit offset. |
ITransactionProvider | transactionProvider | The transactional provider. |
IMarketDataProvider | marketDataProvider | The market data provider. |
Returns
Type | Description |
---|---|
MarketRule<Order, Order> | Rule. |
WhenRegistered(Order, ITransactionProvider)
To create a rule for the event of successful order registration on exchange.
Declaration
public static MarketRule<Order, Order> WhenRegistered(this Order order, ITransactionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Order | order | The order to be traced for the event of successful registration. |
ITransactionProvider | provider | The transactional provider. |
Returns
Type | Description |
---|---|
MarketRule<Order, Order> | Rule. |
WhenRegisterFailed(Order, ITransactionProvider)
To create a for the event of order unsuccessful registration on exchange.
Declaration
public static MarketRule<Order, OrderFail> WhenRegisterFailed(this Order order, ITransactionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Order | order | The order to be traced for unsuccessful registration event. |
ITransactionProvider | provider | The transactional provider. |
Returns
Type | Description |
---|---|
MarketRule<Order, OrderFail> | Rule. |
WhenSpreadLess(MarketDepth, Unit, IMarketDataProvider)
To create a rule for the event of order book spread size decrease on a specific value.
Declaration
public static MarketRule<MarketDepth, MarketDepth> WhenSpreadLess(this MarketDepth depth, Unit price, IMarketDataProvider provider = null)
Parameters
Type | Name | Description |
---|---|---|
MarketDepth | depth | The order book to be traced for the spread change event. |
Unit | price | The shift value. |
IMarketDataProvider | provider | The market data provider. |
Returns
Type | Description |
---|---|
MarketRule<MarketDepth, MarketDepth> | Rule. |
WhenSpreadMore(MarketDepth, Unit, IMarketDataProvider)
To create a rule for the event of order book spread size increase on a specific value.
Declaration
public static MarketRule<MarketDepth, MarketDepth> WhenSpreadMore(this MarketDepth depth, Unit price, IMarketDataProvider provider = null)
Parameters
Type | Name | Description |
---|---|---|
MarketDepth | depth | The order book to be traced for the spread change event. |
Unit | price | The shift value. |
IMarketDataProvider | provider | The market data provider. |
Returns
Type | Description |
---|---|
MarketRule<MarketDepth, MarketDepth> | Rule. |
WhenSubscriptionFailed(Subscription, ISubscriptionProvider)
To create a rule for the event of SubscriptionFailed.
Declaration
public static MarketRule<Subscription, Tuple<Subscription, Exception, bool>> WhenSubscriptionFailed(this Subscription subscription, ISubscriptionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Subscription. |
ISubscriptionProvider | provider | Subscription provider. |
Returns
Type | Description |
---|---|
MarketRule<Subscription, Tuple<Subscription, Exception, Boolean>> | Rule. |
WhenSubscriptionOnline(Subscription, ISubscriptionProvider)
To create a rule for the event of SubscriptionOnline.
Declaration
public static MarketRule<Subscription, Subscription> WhenSubscriptionOnline(this Subscription subscription, ISubscriptionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Subscription. |
ISubscriptionProvider | provider | Subscription provider. |
Returns
Type | Description |
---|---|
MarketRule<Subscription, Subscription> | Rule. |
WhenSubscriptionStarted(Subscription, ISubscriptionProvider)
To create a rule for the event of SubscriptionStarted.
Declaration
public static MarketRule<Subscription, Subscription> WhenSubscriptionStarted(this Subscription subscription, ISubscriptionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Subscription. |
ISubscriptionProvider | provider | Subscription provider. |
Returns
Type | Description |
---|---|
MarketRule<Subscription, Subscription> | Rule. |
WhenSubscriptionStopped(Subscription, ISubscriptionProvider)
To create a rule for the event of SubscriptionStopped.
Declaration
public static MarketRule<Subscription, Tuple<Subscription, Exception>> WhenSubscriptionStopped(this Subscription subscription, ISubscriptionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Subscription. |
ISubscriptionProvider | provider | Subscription provider. |
Returns
Type | Description |
---|---|
MarketRule<Subscription, Tuple<Subscription, Exception>> | Rule. |
WhenTickTradeReceived(Subscription, ISubscriptionProvider)
To create a rule for the event of TickTradeReceived.
Declaration
public static MarketRule<Subscription, Trade> WhenTickTradeReceived(this Subscription subscription, ISubscriptionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Subscription. |
ISubscriptionProvider | provider | Subscription provider. |
Returns
Type | Description |
---|---|
MarketRule<Subscription, Trade> | Rule. |
WhenTimeCome(IConnector, IEnumerable<DateTimeOffset>)
To create a rule, activated at the exact time, specified through times
.
Declaration
public static MarketRule<IConnector, DateTimeOffset> WhenTimeCome(this IConnector connector, IEnumerable<DateTimeOffset> times)
Parameters
Type | Name | Description |
---|---|---|
IConnector | connector | Connection to the trading system. |
IEnumerable<DateTimeOffset> | times | The exact time. Several values may be sent. |
Returns
Type | Description |
---|---|
MarketRule<IConnector, DateTimeOffset> | Rule. |
WhenTimeCome(IConnector, DateTimeOffset[])
To create a rule, activated at the exact time, specified through times
.
Declaration
public static MarketRule<IConnector, DateTimeOffset> WhenTimeCome(this IConnector connector, params DateTimeOffset[] times)
Parameters
Type | Name | Description |
---|---|---|
IConnector | connector | Connection to the trading system. |
DateTimeOffset[] | times | The exact time. Several values may be sent. |
Returns
Type | Description |
---|---|
MarketRule<IConnector, DateTimeOffset> | Rule. |
WhenTotalVolumeMore(ICandleManager, Candle, Unit)
To create a rule for the event of candle total volume excess above a specific level.
Declaration
public static MarketRule<Candle, Candle> WhenTotalVolumeMore(this ICandleManager candleManager, Candle candle, Unit volume)
Parameters
Type | Name | Description |
---|---|---|
ICandleManager | candleManager | The candles manager. |
Candle | candle | The candle to be traced for the event of candle total volume excess above a specific level. |
Unit | volume | The level. If the Type type equals to Limit, specified price is set. Otherwise, shift value is specified. |
Returns
Type | Description |
---|---|
MarketRule<Candle, Candle> | Rule. |