The Position type exposes the following members.
Methods
| Name | Description | |
|---|---|---|
| CloseAtMarket |
Submits a market order to close the position.
| |
| Equals | (Inherited from Object.) | |
| Finalize |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) | |
| GetHashCode |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
| GetType |
Gets the Type of the current instance.
(Inherited from Object.) | |
| MemberwiseClone |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
| SetProfitTarget |
Sets the profit target for this position.
| |
| SetProfitTargetPrice |
Sets the profit target for this position, specified as a fixed price.
| |
| SetProfitTargetRatio |
Sets the profit target for this position, specified as a percentage gain.
| |
| SetStopLoss |
Sets the stop loss for this position.
| |
| SetStopLossPrice |
Sets the stop loss for this position, specified as a fixed price.
| |
| SetStopLossRatio |
Sets the stop loss for this position, specified as a percentage loss.
| |
| SubmitOrder | Overloaded. | |
| ToString |
Outputs a Position object to a string.
(Overrides Object..::.ToString()()().) |
Properties
| Name | Description | |
|---|---|---|
| BarCountExit |
The number of bars before this position will be closed automatically.
If this value is less than zero, the position will not be automatically closed.
| |
| BarsHeld |
The number of bars the position has been or was open for.
| |
| Commission |
The commission costs paid so far for this position.
| |
| CurrentSize |
The current size of this position.
| |
| CurrentStats |
The PositionStats object representing the current state of the position.
| |
| CurrentValue |
Gets the value of this position.
| |
| Description |
A user-definable description for the order.
| |
| EntryPrice |
The weighted average of the entry price for the shares or contracts that
currently make up this position.
| |
| Error |
Error information for the position. This will be null if the order to open the position was
successfully submitted.
| |
| ExitPrice |
The position exit price, as a weighted average.
| |
| Exposure |
Gets the exposure for this position.
| |
| GrossEntryPrice |
The position gross entry price, as a weighted average.
| |
| GrossSize |
The gross size of this position.
| |
| ID |
The unique ID for the position.
| |
| Info |
The PositionInfo object for this position.
This property is for internal use and does not usually need to be used in trading
system code.
| |
| Interest |
The amount of interest earned or paid on this position.
| |
| MaxSize |
The maximum size of this position.
| |
| OpenDate |
The date of the first trade for the position, or MaxValue
if there are no trades.
| |
| Orders |
The pending orders for this position.
| |
| ProfitTarget |
The profit target for the position.
| |
| ProfitTargetType |
The type of profit target for the position.
| |
| RealizedProfit |
The realized profit for this position.
| |
| State |
The position state (pending, open, or closed). A pending position is a position
where the order to open it has been submitted but not filled.
| |
| StopLoss |
The stop loss for the position.
| |
| StopLossType |
The type of stop loss for the position.
| |
| Symbol |
The symbol this position was established for.
| |
| Tag |
An object that can be used to store additional user-defined data related to the position.
| |
| Trades |
The list of trades, or orders that have been filled, for this position.
| |
| Type |
The position type (long or short).
| |
| UnrealizedProfit |
Gets the unrealized profit for a position.
|