The PositionInfo type exposes the following members.
Methods
| Name | Description | |
|---|---|---|
| Clone |
Creates a copy of this 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.) | |
| GetClosedPosition |
Returns a copy of the position with an additional trade to close the position.
| |
| GetCloseStats |
Calculates what the position statistics would be if the position was closed at a given price.
| |
| GetCurrentValue |
Calculates the value of this position.
| |
| GetExposure |
Gets the exposure for this position.
| |
| GetHashCode |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
| GetPositionTypeText |
Provides the textual representation of the PositionType enumeration.
| |
| GetRealizedProfitPct |
Gets the percent profit for a position.
| |
| GetTargetPrice |
Gets the price at which the position will hit a stop loss or profit target
| |
| GetType |
Gets the Type of the current instance.
(Inherited from Object.) | |
| GetUnrealizedProfit |
Calculates the unrealized profit for a position.
| |
| MemberwiseClone |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
| ToString |
Returns a string representation of this position.
(Overrides Object..::.ToString()()().) |
Fields
| Name | Description | |
|---|---|---|
| PositionType |
The type of position (long or short).
| |
| Trades |
The list of trades (orders that were filled) for this position.
|
Properties
| Name | Description | |
|---|---|---|
| BarsHeld |
The number of bars the position has been or was open for.
| |
| CloseDate |
The date of the last trade for the position, or MaxValue
if the position is not closed, or there are no trades.
| |
| CurrentStats |
The PositionStats object representing the current state of the position.
| |
| Description |
A description for the position. This can be specified in the open position order.
| |
| EntryTransType |
The TransactionType used to open or add to this position.
| |
| ExitTransType |
The TransactionType used to close this position or reduce its size.
| |
| OpenDate |
The date of the first trade for the position, or MaxValue
if there are no trades.
| |
| PosID |
The unique ID for the position.
| |
| StatList |
A list of PositionStats objects corresponding to the statistics
after each trade in Trades.
| |
| Symbol |
The symbol this position was established for.
|