The PositionManager type exposes the following members.

Constructors

  NameDescription
Public methodPositionManager()()()()
For serialization
Public methodPositionManager(SystemData)
Constructs a new position manager.
Public methodPositionManager(SystemData, IBroker)
Constructs a new position manager.

Methods

  NameDescription
Public methodAddToPosition
Submits an order to add the specified number of shares or contracts to an existing position.
Public methodCancelOrder
Cancels a pending order.
Public methodCanOpenPosition
Checks if a position can be opened based on the maximum number of open positions.
Public methodCloseAllPositions()()()()
Indiscriminately closes all open positions
Public methodCloseAllPositions(Symbol)
Closes all open positions for the specified symbol.
Public methodClosePosition(String)
Closes a position with a market order.
Public methodClosePosition(String, String)
Closes a position with a market order.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetClosedPositions
Gets a list of closed positions.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetOpenPositions()()()()
Gets a list of open positions for all symbols.
Public methodGetOpenPositions(Symbol)
Gets a list of the currently open positions for a given symbol.
Public methodGetPendingOrdersForPosition
Gets the orders that are currently pending for a position.
Public methodGetPendingPositions()()()()
Gets a list of pending positions.
Public methodGetPendingPositions(Symbol)
Gets a list of pending positions for the specified symbol
Public methodGetPosition
Gets the position with the specified ID.
Public methodGetProfitTarget
Returns the profit target for a position.
Public methodGetStopLoss
Returns the stop loss for a position.
Public methodStatic memberGetTradeTypeName
Gets the name of this trade type.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOpenPosition(PositionSettings)
Submits an order to open a position.
Public methodOpenPosition(Symbol, PositionType, OrderType, Double, Int64, String)
Submits an order to open a position.
Public methodRemoveFromPosition
Submits an order to removes the specified number of shares or contracts from an existing position.
Public methodSetProfitTarget
Sets a profit target for the position with the specified ID.
Public methodSetStopLoss
Sets a stop loss for the position with the specified ID.
Public methodSetTrailingStop
Sets a trailing stop for the position with the specified ID.
Public methodSubmitOrder
Submits an order to modify an open position.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)

Properties

  NameDescription
Public propertyAllocation
Specifies the position size if not specified. This may represent a percentage of account value, a fixed value, or a fixed number of shares depending on the value of AllocationType.
Public propertyAllocationType
Specifies how position size should be determined (if not specified otherwise).
Public propertyBarCountExit
The default bar count exit value for positions, or zero for none.
Public propertyForceRoundLots
Get or set whether or not orders sent to the broker around rounded to the nearest 100 shares.
Public propertyMaxOpenPositions
Gets or sets the maximum number of open positions.
Public propertyMaxOpenPositionsPerSymbol
Gets or sets the maximum number of open positions per symbol.
Public propertyPositionOverfilledAction
Specifies the action to take when a position is overfilled.
Public propertyProfitTarget
The default profit target value for new positions. How this is interpreted is controlled by the ProfitTargetType property.
Public propertyProfitTargetType
The default type of profit target to use for new positions.
Public propertyRestrictOpenOrders
Specifies whether the Max Open Positions settings should limit the number of position open orders submitted.
Public propertyStopLoss
The default stop loss value for new positions. How this is interpreted is controlled by the StopLossType property.
Public propertyStopLossType
The default type of stop loss to use for new positions.
Public propertyUpdateSpecialOrdersForPartialFills
Specifies whether the profit target and stop loss orders for a position should be resized when an order is partially filled. The default value is true.

Events

  NameDescription
Public eventOrderFilled
Event raised when an order is filled.
Public eventOrderSubmitted
Event raised when an order has been submitted. This is nothing more than a notification that the broker received the order.
Public eventOrderUpdated
Event raised when an order is updated (ie filled, canceled, etc.)
Public eventPositionOverfilled
An event that is raised when a position is overfilled.
Public eventSpecialOrderFailed
Event raised if there is an error submitting a profit target, stop loss, or trailing stop order.

See Also