Submits an order to add the specified number of shares or contracts to an existing position.
Namespace:
RightEdge.CommonAssembly: Common (in Common.dll)
Version: 2008.1.0.0 (2008.1.0.0)
Syntax
| C# |
|---|
public Order AddToPosition( string PosID, long shares, OrderType orderType, double price, string description ) |
| Visual Basic (Declaration) |
|---|
Public Function AddToPosition ( _ PosID As String, _ shares As Long, _ orderType As OrderType, _ price As Double, _ description As String _ ) As Order |
| Visual C++ |
|---|
public: Order^ AddToPosition( String^ PosID, long long shares, OrderType orderType, double price, String^ description ) |
Parameters
- PosID
- Type: System..::.String
The existing position's unique identifier.
- shares
- Type: System..::.Int64
Number of shares or contracts to add to 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.