class O2GClosedTradeTableRow
Parents | |
|
Brief
The class provides access to the closed position information.
Details
The class represents a single row of the Closed Trades table.
Prerequisites
The class is available only through the use of the O2GTableManager
. An O2GTableManager
object must have the O2GTableManagerStatus.TABLES_LOADED status.
For complete instructions on the table manager usage, see the
How to use table manager in ForexConnect API section.
After tables are loaded, you must obtain an instance of the O2GClosedTradesTable
class. For example,
O2GClosedTradesTable closedTradesTable = (O2GClosedTradesTable)tableManager.getTable(O2GTableType.CLOSED_TRADES);
Instantiating the class
If you need access to the current closed position information, get an instance of the class by calling any of the following methods of the
O2GClosedTradesTable
class:
|
Syntax example |
|
|
|
|
|
|
|
|
|
|
|
If you want to track the Closed Trades table updates, your application must have a listener class that
implements the IO2GTableListener
interface.
An instance of the listener class must be subscribed to the table updates. Subscription to each update type is done individually.
Before the logout, you must unsubscribe the listener from each update type individually. The examples of subscription/unsubscription syntax are listed below.
|
Subscribe syntax |
Unsubscribe syntax |
|
|
|
|
|
To instantiate the O2GClosedTradeTableRow
class, cast the rowData
parameter of the methods above to the
O2GClosedTradeTableRow
type. For example,
O2GClosedTradeTableRow row = (O2GClosedTradeTableRow)(rowData);
Example
Get Trade ID, close rate and gross profit/loss [show]
The namespace is com.fxcore2
.
Public Methods | |
Gets the unique identification number of the position account. |
|
Gets the type of the position account. |
|
Gets the unique name of the position account. |
|
Gets the amount of a closed position. |
|
Gets the trade operation the position is opened by. |
|
Gets a cell of the table. |
|
Gets the unique identification number of the order the position is closed by. |
|
Gets the unique identifier of the environment that has been used to close the position. |
|
Gets the unique identifier of the order request the position is closed by. |
|
Gets the custom identifier of the order the position is closed by. |
|
Gets the unique identifier of the pair of prices (bid and ask) the position is closed at. |
|
Gets the price the position is closed at. |
|
Gets the date and time when the position is closed. |
|
Gets the columns of the table. |
|
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. |
|
Gets the profit/loss of the position. |
|
Gets the unique identification number of a traded instrument. |
|
Gets the unique identification number of the order the position is opened by. |
|
Gets the unique identifier of the environment that has been used to open the position. |
|
Gets the unique identifier of the order request the position is opened by. |
|
Gets the custom identifier of the order the position is opened by. |
|
Gets the unique identifier of the pair of prices (bid and ask) the position is opened at. |
|
Gets the price the position is opened at. |
|
Gets the date and time when the position is opened. |
|
Gets the cumulative amount of funds added to the account balance for holding a position opened overnight. |
|
Gets the type of the table. |
|
Gets the unique identification number of the position. |
|
Gets the unique identification number of the position, a partial closing of which results in the opening of the current position. |
|
Gets the unique identification number of the position opened as the result of the current position partial closing. |
|
Gets the simulated delivery date. |
|
Gets a flag indicating whether the value of the cell is changed. |