Submits an order to open a position.

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


public Position OpenPosition(
	Symbol symbol,
	PositionType positionType,
	OrderType orderType,
	double price,
	long size,
	string description
Visual Basic
Public Function OpenPosition ( 
	symbol As Symbol,
	positionType As PositionType,
	orderType As OrderType,
	price As Double,
	size As Long,
	description As String
) As Position
Visual C++
Position^ OpenPosition(
	Symbol^ symbol, 
	PositionType positionType, 
	OrderType orderType, 
	double price, 
	long long size, 
	String^ description
member OpenPosition : 
        symbol : Symbol * 
        positionType : PositionType * 
        orderType : OrderType * 
        price : float * 
        size : int64 * 
        description : string -> Position 


Type: RightEdge.Common..::..Symbol
Symbol to open this position for.
Type: RightEdge.Common..::..PositionType
The PositionType. See the PositionType enumeration
Type: RightEdge.Common..::..OrderType
The type of order. See the OrderType enumeration
Type: System..::..Double
Limit or Stop price (if applicable).
Type: System..::..Int64
The number of shares or contracts to establish this position with. If this is zero, the position will be sized based on the settings in AllocationType, Allocation.
Type: System..::..String
An optional user-defined description for the position.

Return Value

Type: Position
A newly created Position object.


If the OpenPosition call succeeded, the Error property of the returned position will be null. If the call failed, then this property will contain a description of the error.

Note that success does not mean that the order was filled by the broker, just that an order was successfully sent to the broker. When this method returns successfully, the PositionState of the returned position will be Pending. If and when the order is filled, the state will change to Open.

See Also