class ClosedPosition

Parents

object

Brief

The class provides access to information about a closed position

Public Methods

ClosedPosition

This method is a constructor for the class representing a closed position, it initializes the various properties describing closed position with default values. The constructor does not return any values

getAccountId

Gets the unique identification number of the account the position was closed on

getAccountKind

Gets the type of the account the position was closed on

getAccountName

Gets the unique name of the account the position was closed on

getAmount

Gets the amount of the closed position

getBuySell

Gets the trade operation the position was opened by

getCloseOrderId

Gets the unique identifier of the order at which the position was closed

getCloseOrderParties

Gets the unique identifier of the environment that was used to close the position

getCloseOrderReqId

Gets the unique identifier of the order request at which the position was closed

getCloseOrderRequestTXT

Gets the custom identifier of the order at which the position was closed

getCloseQuoteId

Get the unique identifier of the price pair bid and ask at which the position was closed

getCloseRate

Get the price at which the position was closed

getCloseTime

Gets the date and time when the position was closed

getCommission

Gets the amount of funds subtracted from the account balance to pay for the brokers service in accordance with the terms and conditions of the account trading agreement

getDividends

Gets the amount of dividends earned or paid for the position

getGrossPL

Gets the profit or loss of the position in the account currency

getNetPL

Gets the amount of the position profit/loss including commissions, interest, and dividends

getOfferId

Gets the unique identification number of the instrument traded

getOpenOrderId

Gets the unique identification number of the order the position was opened by

getOpenOrderReqId

Gets the identifier of the order request the position was opened by

getOpenOrderRequestTXT

Gets the custom identifier of the order the position was opened by

getOpenQuoteId

Gets the unique identifier of the pair of prices bid and ask at which the position was opened

getOpenRate

Gets the price at which the position was opened

getOpenTime

Gets the date and time when the position was opened

getPL

Gets the profit or loss of one lot of the position in the account currency

getPLPips

Gets the profit or loss of one lot of the position in pips

getRolloverInterest

Gets the cumulative amount of funds that is added the account balance for holding the position overnight

getTradeID

Gets the unique identification number of the position

getTradeIdOrigin

Gets the unique identification number of the position a partial closing of which resulted in opening of the current position

getTradeIdRemain

Gets the unique identification number of the position opened as a result of the partial closing of the current position

getValueDate

Gets the simulated delivery date

back