Click or drag to resize

Strategy Methods

The Strategy type exposes the following members.

Methods
  NameDescription
Public methodApplyChanges
Apply changes.
Public methodApplyCommand
Apply incoming command.
Protected methodAssignOrderStrategyId
To set the strategy identifier for the order.
Public methodAttachOrder
To add the active order to the strategy and process trades by the order.
Public methodCancelActiveOrders
To cancel all active orders (to stop and regular).
Public methodCancelOrder
Cancel the order.
Public methodClone
Create a copy of Strategy.
Public methodDispose (Inherited from Disposable.)
Protected methodDisposeManaged
Release resources.
(Overrides Disposable.DisposeManaged.)
Protected methodDisposeNative (Inherited from Disposable.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize (Inherited from Disposable.)
Public methodGetFilteredMarketDepth
Get filtered order book.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLevel1Fields
To get a set of available fields Level1Fields, for which there is a market data for the instrument.
Public methodGetMarketDepth
To get the quotes order book.
Public methodGetSecurityValue
To get the value of market data for the instrument.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodInitStartValues
Init.
Public methodLoad
Load settings.
(Overrides BaseLogSourceLoad(SettingsStorage).)
Public methodLookup
Lookup securities by criteria criteria.
Public methodLookupBoards
To find boards that match the filter criteria. Found boards will be passed through the event LookupBoardsResult.
Public methodLookupSecurities
To find instruments that match the filter criteria. Found instruments will be passed through the event LookupSecuritiesResult.
Public methodLookupTimeFrames
To find time-frames that match the filter criteria. Found time-frames will be passed through the event LookupTimeFramesResult.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnError
Processing of error, occurred as result of strategy operation.
Protected methodOnNewMyTrade
The method, called at occurrence of new strategy trade.
Protected methodOnOrderCanceling
To call the event OrderRegistered.
Protected methodOnOrderChanged
The method, called at strategy order change.
Protected methodOnOrderRegistered
To call the event OrderRegistered.
Protected methodOnOrderRegisterFailed
The method, called at strategy order registration error.
Protected methodOnOrderRegistering
To call the event OrderRegistering.
Protected methodOnOrderReRegistering
To call the event OrderReRegistering.
Protected methodOnReseted
Protected methodOnStarted
The method is called when the Start method has been called and the ProcessState state has been taken the Started value.
Protected methodOnStopped
The method is called when the ProcessState process state has been taken the Stopped value.
Protected methodOnStopping
The method is called when the ProcessState process state has been taken the Stopping value.
Protected methodProcessCancelActiveOrders
To cancel all active orders (to stop and regular).
Protected methodProcessNewOrders
To process orders, received for the connection Connector, and find among them those, belonging to the strategy.
Protected methodRaiseLog
To call the event Log.
(Overrides BaseLogSourceRaiseLog(LogMessage).)
Protected methodRaiseParametersChanged
To call events ParametersChanged and PropertyChanged.
Protected methodRaiseProcessStateChanged
To call the event ProcessStateChanged.
Public methodRegisterFilteredMarketDepth
To start getting filtered quotes (order book) by the instrument. Quotes values are available through the event FilteredMarketDepthChanged.
Public methodRegisterOrder
Register new order.
Public methodReRegisterOrder
Reregister the order.
Public methodReset
To re-initialize the trade algorithm. It is called after initialization of the strategy object and loading stored parameters.
Public methodSafeGetConnector
To get the strategy getting Connector. If it is not initialized, the exception will be discarded.
Public methodSave
Save settings.
(Overrides BaseLogSourceSave(SettingsStorage).)
Public methodStart
To start the trade algorithm.
Public methodStart(CandleSeries, NullableDateTimeOffset, NullableDateTimeOffset)
To send data request.
Public methodStop
To stop the trade algorithm.
Public methodStop(CandleSeries)
Public methodSubscribe
Subscribe.
Public methodSubscribeBoard
Subscribe on the board changes.
Public methodSubscribeLevel1
To start getting new information (for example, LastTrade or BestBid) by the instrument.
Public methodSubscribeMarketData(MarketDataMessage)
To subscribe to get market data.
Public methodSubscribeMarketData(Security, MarketDataMessage)
To subscribe to get market data by the instrument.
Public methodSubscribeMarketDepth
To start getting quotes (order book) by the instrument. Quotes values are available through the event MarketDepthChanged.
Public methodSubscribeNews
Subscribe on news.
Public methodSubscribeOrderLog
Subscribe on order log for the security.
Public methodSubscribeTrades
To start getting trades (tick data) by the instrument. New trades will come through the event NewTrade.
Protected methodThrowIfDisposed (Inherited from Disposable.)
Public methodToInfoMessage
Convert to StrategyInfoMessage.
Public methodToString
Returns a string that represents the current object.
(Inherited from BaseLogSource.)
Public methodUnRegisterFilteredMarketDepth
To stop getting filtered quotes by the instrument.
Public methodUnSubscribe(Int64)
Unsubscribe.
Public methodUnSubscribe(Subscription)
Unsubscribe.
Public methodUnSubscribeBoard
Unsubscribe from the board changes.
Public methodUnSubscribeLevel1
To stop getting new information.
Public methodUnSubscribeMarketData(MarketDataMessage)
To unsubscribe from getting market data.
Public methodUnSubscribeMarketData(Security, MarketDataMessage)
To unsubscribe from getting market data by the instrument.
Public methodUnSubscribeMarketDepth
To stop getting quotes by the instrument.
Public methodUnSubscribeNews
Unsubscribe from news.
Public methodUnSubscribeOrderLog
Unsubscribe from order log for the security.
Public methodUnSubscribeTrades
To stop getting trades (tick data) by the instrument.
Top
Extension Methods
  NameDescription
Public Extension MethodActiveRule
To activate the rule.
(Defined by MarketRuleHelper.)
Public Extension MethodAddDebugLog
To record a debug message to the log.
(Defined by LoggingHelper.)
Public Extension MethodAddErrorLog(FuncString)Overloaded.
To record an error to the log.
(Defined by LoggingHelper.)
Public Extension MethodAddErrorLog(Exception)Overloaded.
To record an error to the log.
(Defined by LoggingHelper.)
Public Extension MethodAddErrorLog(Exception, String)Overloaded.
To record an error to the log.
(Defined by LoggingHelper.)
Public Extension MethodAddErrorLog(String, Object)Overloaded.
To record an error to the log.
(Defined by LoggingHelper.)
Public Extension MethodAddInfoLog(FuncString)Overloaded.
To record a message to the log.
(Defined by LoggingHelper.)
Public Extension MethodAddInfoLog(String, Object)Overloaded.
To record a message to the log.
(Defined by LoggingHelper.)
Public Extension MethodAddLog
To record a message to the log.
(Defined by LoggingHelper.)
Public Extension MethodAddOrderErrorLog
Write order error to the log.
(Defined by TraderHelper.)
Public Extension MethodAddOrderInfoLog
Write order info to the log.
(Defined by TraderHelper.)
Public Extension MethodAddRuleLog
To write the message from the rule.
(Defined by MarketRuleHelper.)
Public Extension MethodAddVerboseLog
To record a verbose message to the log.
(Defined by LoggingHelper.)
Public Extension MethodAddWarningLog(FuncString)Overloaded.
To record a warning to the log.
(Defined by LoggingHelper.)
Public Extension MethodAddWarningLog(String, Object)Overloaded.
To record a warning to the log.
(Defined by LoggingHelper.)
Public Extension MethodBuyAtLimit
To create the initialized order object for buy.
(Defined by StrategyHelper.)
Public Extension MethodBuyAtMarket
To create initialized object of buy order at market price.
(Defined by StrategyHelper.)
Public Extension MethodClosePosition
To close open position by market (to register the order of the type Market).
(Defined by StrategyHelper.)
Public Extension MethodClosePositionByQuoting
To close the open position via quoting.
(Defined by Extensions.)
Public Extension MethodCreateOrder
To create the initialized order object.
(Defined by StrategyHelper.)
Public Extension MethodGetAllowTrading
To get the strategy operation mode (initialization or trade).
(Defined by StrategyHelper.)
Public Extension MethodGetAllSecurity
Find AllSecurity instance in the specified provider.
(Defined by TraderHelper.)
Public Extension MethodGetCandleTCandle
To get a candle by the index.
(Defined by CandleHelper.)
Public Extension MethodGetCandleCount
To get the number of candles.
(Defined by CandleHelper.)
Public Extension MethodGetCandleManager
To get the candle manager, associated with the passed strategy.
(Defined by StrategyHelper.)
Public Extension MethodGetCandlesTCandle(CandleSeries)Overloaded.
To get all candles.
(Defined by CandleHelper.)
Public Extension MethodGetCandlesTCandle(CandleSeries, DateTimeOffset)Overloaded.
To get all candles for the time period.
(Defined by CandleHelper.)
Public Extension MethodGetCandlesTCandle(CandleSeries, RangeDateTimeOffset)Overloaded.
To get candles by date range.
(Defined by CandleHelper.)
Public Extension MethodGetCandlesTCandle(CandleSeries, Int32)Overloaded.
To get candles by the total number.
(Defined by CandleHelper.)
Public Extension MethodGetChart
To get the chart associated with the passed strategy.
(Defined by ChartHelper.)
Public Extension MethodGetCurrentCandleTCandle
To get the current candle.
(Defined by CandleHelper.)
Public Extension MethodGetIsEmulation
To get the strategy start-up mode (paper trading or real).
(Defined by StrategyHelper.)
Public Extension MethodGetLogLevel
Get LogLevel for the source. If the value is equal to Inherit, then parental source level is taken.
(Defined by LoggingHelper.)
Public Extension MethodGetSecurityValueT(Level1Fields)Overloaded.
To get market data value for the strategy instrument.
(Defined by StrategyHelper.)
Public Extension MethodGetSecurityValueT(Security, Level1Fields)Overloaded.
To get the value of market data for the instrument.
(Defined by TraderHelper.)
Public Extension MethodGetSecurityValues
To get all market data values for the instrument.
(Defined by TraderHelper.)
Public Extension MethodGetSeriesTCandle
To get a candles series by the specified parameters.
(Defined by CandleHelper.)
Public Extension MethodGetStrategyProcessStateIconName
Get icon for ProcessState.
(Defined by Extensions.)
Public Extension MethodGetTimeFrameCandle
To get a temporary candle on the specific date.
(Defined by CandleHelper.)
Public Extension MethodIsCandlesRegisteredTCandle
Whether the grouping of candles by the specified attribute is registered.
(Defined by CandleHelper.)
Public Extension MethodLoadState
To restore the strategy state.
(Defined by StrategyHelper.)
Public Extension MethodLookup
Lookup securities by criteria criteria.
(Defined by TraderHelper.)
Public Extension MethodLookupAll
Get all available instruments.
(Defined by TraderHelper.)
Public Extension MethodLookupByCode
To get the instrument by the instrument code.
(Defined by TraderHelper.)
Public Extension MethodLookupById(String)Overloaded.
To get the instrument by the identifier.
(Defined by TraderHelper.)
Public Extension MethodLookupById(SecurityId)Overloaded.
To get the instrument by the identifier.
(Defined by TraderHelper.)
Public Extension MethodLookupByNativeId
To get the instrument by the system identifier.
(Defined by TraderHelper.)
Public Extension MethodLookupByPortfolioName
To get the portfolio by the code name.
(Defined by TraderHelper.)
Public Extension MethodOpenPositionByQuoting
To open the position via quoting.
(Defined by Extensions.)
Public Extension MethodParamT(String, T)Overloaded. (Defined by StrategyParamHelper.)
Public Extension MethodParamT(String, String, T)Overloaded. (Defined by StrategyParamHelper.)
Public Extension MethodReRegisterOrder
Reregister the order.
(Defined by TraderHelper.)
Public Extension MethodSellAtLimit
To create the initialized order object for sell.
(Defined by StrategyHelper.)
Public Extension MethodSellAtMarket
To create the initialized order object of sell order at market price.
(Defined by StrategyHelper.)
Public Extension MethodSetAllowTrading
To set the strategy operation mode (initialization or trade).
(Defined by StrategyHelper.)
Public Extension MethodSetCandleManager
To set the candle manager for the strategy.
(Defined by StrategyHelper.)
Public Extension MethodSetChart
To set a chart for the strategy.
(Defined by ChartHelper.)
Public Extension MethodSetIsEmulation
To get the strategy start-up mode (paper trading or real).
(Defined by StrategyHelper.)
Public Extension MethodStart
To start candles getting.
(Defined by CandleHelper.)
Public Extension MethodSuspendRules
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.
(Defined by MarketRuleHelper.)
Public Extension MethodTryRemoveRule
To delete a rule. If a rule is executed at the time when this method is called, it will not be deleted.
(Defined by MarketRuleHelper.)
Public Extension MethodTryRemoveWithExclusive
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.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenCandles
To create a rule for the event of candles occurrence, change and end.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenCandlesChanged
To create a rule for candle change event.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenCandlesFinished
To create a rule for candles end event.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenCandlesStarted
To create a rule for the event of new candles occurrence.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenChanged
To create a rule for candle change event.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenClosePriceLess
To create a rule for the event of candle closing price reduction below a specific level.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenClosePriceMore
To create a rule for the event of candle closing price excess above a specific level.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenCurrentCandleTotalVolumeMore
To create a rule for the event of candle total volume excess above a specific level.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenError
To create a rule for event of strategy error (transition of state ErrorState into Error).
(Defined by StrategyHelper.)
Public Extension MethodWhenFinished
To create a rule for candle end event.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenNewMyTradeOverloaded.
To create a rule for the event of new trade occurrences.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenNewMyTradeOverloaded.
To create a rule for the event of occurrence new strategy trade.
(Defined by StrategyHelper.)
Public Extension MethodWhenNewOrder
To create a rule for the event of new orders occurrences.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenOrderChanged
To create a rule for event of change of any strategy order.
(Defined by StrategyHelper.)
Public Extension MethodWhenOrderRegistered
To create a rule for event of occurrence of new strategy order.
(Defined by StrategyHelper.)
Public Extension MethodWhenPartiallyFinished
To create a rule for the event of candle partial end.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenPartiallyFinishedCandles
To create a rule for the event of candle partial end.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenPnLChanged
To create a rule for event of profit change.
(Defined by StrategyHelper.)
Public Extension MethodWhenPnLLess
To create a rule for event of profit reduction below the specified level.
(Defined by StrategyHelper.)
Public Extension MethodWhenPnLMore
To create a rule for event of profit increase above the specified level.
(Defined by StrategyHelper.)
Public Extension MethodWhenPositionChanged
To create a rule for the event of strategy position change.
(Defined by StrategyHelper.)
Public Extension MethodWhenPositionLess
To create a rule for event of position event reduction below the specified level.
(Defined by StrategyHelper.)
Public Extension MethodWhenPositionMore
To create a rule for event of position event increase above the specified level.
(Defined by StrategyHelper.)
Public Extension MethodWhenStarted
To create a rule for event of start of strategy operation.
(Defined by StrategyHelper.)
Public Extension MethodWhenStopped
To create a rule for event full stop of strategy operation.
(Defined by StrategyHelper.)
Public Extension MethodWhenStopping
To create a rule for event of beginning of the strategy operation stop.
(Defined by StrategyHelper.)
Public Extension MethodWhenSubscriptionFailed
To create a rule for the event of failed subscription.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenSubscriptionOnline
To create a rule for the event of online subscription.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenSubscriptionStarted
To create a rule for the event of started subscription.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenSubscriptionStopped
To create a rule for the event of stopped subscription.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenTotalVolumeMore
To create a rule for the event of candle total volume excess above a specific level.
(Defined by MarketRuleHelper.)
Public Extension MethodWhenWarning
To create a rule for event of strategy warning (transition of state ErrorState into Warning).
(Defined by StrategyHelper.)
Top
See Also