class IO2GClosedTradeTableRow
Parents | |
IO2GClosedTradeRow |
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 IO2GTableManager
. An IO2GTableManager
object must have the O2GTableManagerStatus.TablesLoaded 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 IO2GClosedTradesTable
class. For example,
O2GClosedTradesTable closedTradesTable = (O2GClosedTradesTable)tableManager.getTable(O2GTable::ClosedTrades);
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
IO2GClosedTradesTable
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 separately. 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]
Public Methods | |
Gets the columns of the table. |
|
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 value of a table cell. |
|
Gets the unique identification number of the order the position is closed by. |
|
Gets the unique identifier of the environment that is used to close the position. |
|
Gets the unique identifier of the order 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 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 was 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 current profit/loss per one lot of the position. |
|
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, partial closing of which results in opening of the current position. |
|
Gets the unique identification number of the position opened as a result of the current position partial closing. |
|
Gets the simulated delivery date. |
|
Gets a flag indicating whether the value of the cell is changed. |