Submits an order to open a position.

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

Syntax

C#
public Position OpenPosition(
	PositionType positionType,
	OrderType orderType,
	double price
)
Visual Basic
Public Function OpenPosition ( 
	positionType As PositionType,
	orderType As OrderType,
	price As Double
) As Position
Visual C++
public:
Position^ OpenPosition(
	PositionType positionType, 
	OrderType orderType, 
	double price
)
F#
member OpenPosition : 
        positionType : PositionType * 
        orderType : OrderType * 
        price : float -> Position 

Parameters

positionType
Type: RightEdge.Common..::..PositionType
The PositionType (long or short).
orderType
Type: RightEdge.Common..::..OrderType
The type of order (market, limit, etc.)
price
Type: System..::..Double
Limit or Stop price (if applicable).

Return Value

Type: Position
A newly created Position object.

Remarks

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 State of the returned position will be Pending. If and when the order is filled, the state will change to Open.

See Also