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
Public property AccountID string Gets the account ID of the Position.
Public property AveragePrice double Gets the average price of all positions for the current symbol.
Public property BigPointValue double Get the dollar value for a one point movement.
Public property ContractExpirationDate datetime Get the expiration date for the contract.
Public property ExtendedProperties object Gets the DynamicProperties object associated with the Position.
Public property InitialMargin double Gets the account balance required for entering a position on margin.
Public property MaintenanceMargin double Gets the account balance required for maintaining a position on margin.
Public property MarginExpirationDate datetime Get the date of that the margin position expires.
Public property MarketValue double Gets the actual market value of the open position.
Public property OpenPL double Gets the unrealized profit or loss on the position held.
Public property OriginalCost double Gets the original cost of the trade (Forex only).
Public property PLPerQuantity double Gets the unrealized profit or loss divided by the number of shares or contracts held.
Public property PercentPL double Gets the unrealized profit or loss as a percentage of the initial value.
Public property PositionID string Gets the unique ID of the Position object.
Public property 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.
Public property RequiredMargin double Gets the margin requirement of the position.
Public property Symbol string Get the symbol of the current position.
Public property SymbolType enum Gets the type of security. See SecurityType for a list of possible values.
Public property TotalCost double Gets the total cost of the open position.
Public property Type enum Gets the PositionType of the position.
Methods
  Name Description
Public property Close Closes the current position.
Public property CreateClosingTicket Creates an OrderTicket to close the position.
Public property Reverse(templatePath)

Reverses the position using the parameters in file referred to in the templatePath.

Public property Reverse()

Reverses the position.

Events
  Name Description
 Public event Updated Occurs whenever the Position object is updated. See PositionUpdatedEventArgs for the properties returned by the handler's args parameters.
Inheritance Hierarchy

elsystem.Object

tsdata.trading.Position