Submits an order to removes the specified number of shares or contracts from an existing position.

Namespace:  RightEdge.Common
Assembly:  Common (in Common.dll)
Version: 2008.1.0.0 (2008.1.0.0)

Syntax

C#
public Order RemoveFromPosition(
	string PosID,
	uint shares,
	OrderType orderType,
	double price,
	string description
)
Visual Basic (Declaration)
Public Function RemoveFromPosition ( _
	PosID As String, _
	shares As UInteger, _
	orderType As OrderType, _
	price As Double, _
	description As String _
) As Order
Visual C++
public:
Order^ RemoveFromPosition(
	String^ PosID, 
	unsigned int shares, 
	OrderType orderType, 
	double price, 
	String^ description
)

Parameters

PosID
Type: System..::.String
The existing position's unique identifier.
shares
Type: System..::.UInt32
Number of shares or contracts to remove from an existing position.
orderType
Type: RightEdge.Common..::.OrderType
The type of order. See the OrderType enumeration
price
Type: System..::.Double
Limit or Stop price, if applicable
description
Type: System..::.String
User-defined description for the trade.

Return Value

An Order object representing the order that was submitted.

Remarks

If there is an error which prevents the order from being submitted, then the Error property of the returned object will contain the error message. If the order was successfully submitted, the Error property will be null.

See Also