class O2GClosedTradeRow

Parents
O2GRow

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

O2GClosedTradesTableResponseReader.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 O2GLoginRules.isTableLoadedByDefault method:

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

For details, see the example below.

O2GTablesUpdatesReader.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 O2GResponse object is of the O2GResponseType.TablesUpdates type.
You must parse this object by using the O2GTablesUpdatesReader object.

For details, see the example below.

Example

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

The type defined in the fxcore2.dll assembly. The namespace is fxcore2.

Public Properties

AccountID

Gets the unique identification number of the position account.

AccountKind

Gets the type of the position account.

AccountName

Gets the unique name of the position account.

Amount

Gets the amount of a closed position.

BuySell

Gets the trade operation the position is opened by.

CloseOrderID

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

CloseOrderParties

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

CloseOrderReqID

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

CloseOrderRequestTXT

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

CloseQuoteID

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

CloseRate

Gets the price the position is closed at.

CloseTime

Gets the date and time when the position is closed.

Columns

The columns of the table.

Commission

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.

GrossPL

Gets the profit/loss of the position.

OfferID

Gets the unique identification number of a traded instrument.

OpenOrderID

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

OpenOrderParties

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

OpenOrderReqID

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

OpenOrderRequestTXT

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

OpenQuoteID

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

OpenRate

Gets the price the position is opened at.

OpenTime

Gets the date and time when the position is opened.

RolloverInterest

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

TableType

The type of the table.

TradeID

Gets the unique identification number of the position.

TradeIDOrigin

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

TradeIDRemain

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

ValueDate

Gets the simulated delivery date.

Public Methods

getCell

Gets a cell of the table.

isCellChanged

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

back