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 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 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.
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 methodOnPositionChanged
The method, called at strategy position change.
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 methodOnStopOrderCanceling
To call the event StopOrderRegistered.
Protected methodOnStopOrderChanged
The method, called at strategy stop order change.
Protected methodOnStopOrderRegistered
To call the event StopOrderRegistered.
Protected methodOnStopOrderRegisterFailed
The method, called at strategy stop order registration error.
Protected methodOnStopOrderRegistering
To call the event StopOrderRegistering.
Protected methodOnStopOrderReRegistering
To call the event StopOrderReRegistering.
Protected methodOnStopOrdersChanged
The method, called at strategy stop orders change.
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 methodRegisterOrder
To register the order and automatically add to start mechanism of profit-loss and slippage.
Public methodReRegisterOrder
To re-register the order and automatically add to start mechanism of profit-loss and slippage.
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 methodStop
To stop the trade algorithm.
Protected methodThrowIfDisposed (Inherited from Disposable.)
Public methodToInfoMessage
Convert to StrategyInfoMessage.
Public methodToString
Returns a string that represents the current object.
(Inherited from BaseLogSource.)
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 MethodGetCandleManager
To get the candle manager, associated with the passed strategy.
(Defined by StrategyHelper.)
Public Extension MethodGetChart
To get the chart associated with the passed strategy.
(Defined by ChartHelper.)
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 MethodGetMessageSender
To get the message sender, associated with the passed strategy.
(Defined by StrategyHelper.)
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 MethodGetStrategyProcessStateIconName
Get icon for ProcessState.
(Defined by Extensions.)
Public Extension MethodLoadState
To restore the strategy state.
(Defined by StrategyHelper.)
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 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 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 MethodSetMessageSender
To set the message sender for the strategy.
(Defined by StrategyHelper.)
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 MethodWhenError
To create a rule for event of strategy error (transition of state ErrorState into Error).
(Defined by StrategyHelper.)
Public Extension MethodWhenNewMyTrade
To create a rule for the event of occurrence new strategy trade.
(Defined by StrategyHelper.)
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 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 MethodWhenWarning
To create a rule for event of strategy warning (transition of state ErrorState into Warning).
(Defined by StrategyHelper.)
Top
See Also