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: 2010.1.0.0 (2010.1.0.0)

Syntax

C#
public Order RemoveFromPosition(
	string PosID,
	long shares,
	OrderType orderType,
	double price,
	string description
)
Visual Basic
Public Function RemoveFromPosition ( 
	PosID As String,
	shares As Long,
	orderType As OrderType,
	price As Double,
	description As String
) As Order
Visual C++
public:
Order^ RemoveFromPosition(
	String^ PosID, 
	long long shares, 
	OrderType orderType, 
	double price, 
	String^ description
)
F#
member RemoveFromPosition : 
        PosID : string * 
        shares : int64 * 
        orderType : OrderType * 
        price : float * 
        description : string -> Order 

Parameters

PosID
Type: System..::..String
The existing position's unique identifier.
shares
Type: System..::..Int64
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

Type: Order
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