Position Class
Accesses the market position properties for a specified symbol and account when using an PositionsProvider component.
Namespace: tsdata.trading
Properties
Additional
properties, methods, and events are described in the classes listed
under Inheritance Hierarchy (see below).
| Name | Type | Description | |
|
|
AccountID | string | Gets the account ID of the Position. |
|
|
AveragePrice | double | Gets the average price of all positions for the current symbol. |
|
|
BigPointValue | double | Get the dollar value for a one point movement. |
|
|
ContractExpirationDate | datetime | Get the expiration date for the contract. |
|
|
ExtendedProperties | object | Gets the DynamicProperties object associated with the Position. |
|
|
InitialMargin | double | Gets the account balance required for entering a position on margin. |
|
|
MaintenanceMargin | double | Gets the account balance required for maintaining a position on margin. |
|
|
MarginExpirationDate | datetime | Get the date of that the margin position expires. |
|
|
MarketValue | double | Gets the actual market value of the open position. |
|
|
OpenPL | double | Gets the unrealized profit or loss on the position held. |
|
|
OriginalCost | double | Gets the original cost of the trade (Forex only). |
|
|
PLPerQuantity | double | Gets the unrealized profit or loss divided by the number of shares or contracts held. |
|
|
PercentPL | double | Gets the unrealized profit or loss as a percentage of the initial value. |
|
|
PositionID | string | Gets the unique ID of the Position object. |
|
|
Quantity | int | Gets the number of shares or contracts in the current position. This property's value is positive if the position is a long position, and negative if the position is a short position. |
|
|
RequiredMargin | double | Gets the margin requirement of the position. |
|
|
Symbol | string | Get the symbol of the current position. |
|
|
SymbolType | enum | Gets the type of security. See SecurityType for a list of possible values. |
|
|
TotalCost | double | Gets the total cost of the open position. |
|
|
|
enum | Gets the PositionType of the position. |
Methods
| Name | Description | |
|
|
Close | Closes the current position. |
|
|
CreateClosingTicket | Creates an OrderTicket to close the position. |
|
|
Reverse(templatePath) |
Reverses the position using the parameters in file referred to in the templatePath. |
|
|
Reverse() |
Reverses the position. |
Events
| Name | Description | |
| |
Updated | Occurs whenever the Position object is updated. See PositionUpdatedEventArgs for the properties returned by the handler's args parameters. |
Inheritance Hierarchy
tsdata.trading.Position