class IO2GClosedTradeRow

Parents
IO2GRow

Brief

The class provides access to information about a position closed during the current trading day.

Details

An instance of the class can be obtained by the following methods:

Method/Use

Prerequisites

IO2GClosedTradesTableResponseReader.getRow

This method is used to get the initial information about a closed position after a session with the trading server is established.
This method provides access to a single closed position. If you have multiple closed positions, call this method in a loop.

Depending on the trading server settings, the ClosedTrades table may or may not be loaded by the server automatically during the login process.
To determine whether the table is loaded or not and what follow-up action is required to get closed position information, use the returned value of the IO2GLoginRules.isTableLoadedByDefault method:

Both methods use the IO2GResponse object of the O2GResponseType.GetClosedTrades type.
You must parse this object by using the IO2GClosedTradesTableResponseReader object.

For details, see the example below.

IO2GTablesUpdatesReader.getTradeRow

This method is used to get information about a position closed during a session lifetime.
This method provides access to a single closed position. To track closing of multiple positions, call this method in a loop.

To receive information about a position closing, you must implement the IO2GResponseListener.onTablesUpdates method. The received IO2GResponse object is of the O2GResponseType.TablesUpdates type.
You must parse this object by using the IO2GTablesUpdatesReader object.

For details, see the example below.

Example

Get Trade ID, Offer ID and Amount of closed position [show]

Public Methods

columns

Gets the columns of the table.

getAccountID

Gets the unique identification number of the position account.

getAccountKind

Gets the type of the position account.

getAccountName

Gets the unique name of the position account.

getAmount

Gets the amount of a closed position.

getBuySell

Gets the trade operation the position is opened by.

getCell

Gets value of a table cell.

getCloseOrderID

Gets the unique identification number of the order the position is closed by.

getCloseOrderParties

Gets the unique identifier of the environment that is used to close the position.

getCloseOrderReqID

Gets the unique identifier of the order the position is closed by.

getCloseOrderRequestTXT

Gets the custom identifier of the order the position is closed by.

getCloseQuoteID

Gets the unique identifier of the pair of prices (bid and ask) the position is closed at.

getCloseRate

Gets the price the position is closed at.

getCloseTime

Gets the date and time when the position is closed.

getCommission

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

getGrossPL

Gets the profit/loss of the position.

getOfferID

Gets the unique identification number of a traded instrument.

getOpenOrderID

Gets the unique identification number of the order the position is opened by.

getOpenOrderParties

Gets the unique identifier of the environment that was used to open the position.

getOpenOrderReqID

Gets the unique identifier of the order request the position is opened by.

getOpenOrderRequestTXT

Gets the custom identifier of the order the position is opened by.

getOpenQuoteID

Gets the unique identifier of the pair of prices (bid and ask) the position is opened at.

getOpenRate

Gets the price the position is opened at.

getOpenTime

Gets the date and time when the position is opened.

getRolloverInterest

Gets the cumulative amount of funds added to the account balance for holding a position opened overnight.

getTableType

Gets the type of the table.

getTradeID

Gets the unique identification number of the position.

getTradeIDOrigin

Gets the unique identification number of the position, partial closing of which results in opening of the current position.

getTradeIDRemain

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

getValueDate

Gets the simulated delivery date.

isCellChanged

Gets a flag indicating whether the value of the cell is changed.

back