class IO2GSummaryTableRow
Parents | |
IO2GSummaryRow |
Brief
The class provides access to the summary information of the instrument traded.
Details
The class represents a single row of the Summary table.
The class provides methods to access summarized information, such as buy/sell gross and net profits/losses, average open prices, amounts of long and short positions, etc.
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 IO2GSummaryTable
class. For example,
O2GSummaryTable summaryTable = (O2GSummaryTable)tableManager.getTable(O2GTable::Summary);
Instantiating the class
If you need access to the current summary information, get an instance of the class by calling any of the following methods of the IO2GSummaryTable
class:
|
Syntax example |
|
|
|
|
|
|
|
|
|
|
|
If you want to track the Summary 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 for 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 O2GSummaryTableRow
class, you must cast the rowData
parameter of the above methods to the O2GSummaryTableRow
type. For example,
O2GSummaryTableRow row = (O2GSummaryTableRow)(rowData);
Example
Get Offer ID, net profit/loss and amount for the traded instrument [show]
Public Methods | |
Gets the columns of the table. |
|
Gets the amount of all positions (both long and short). |
|
Gets the amount of long (buy) positions. |
|
Gets the average open price of long (buy) positions. |
|
Gets the current market price at which all sell positions opened in the instrument can be closed. |
|
Gets the current profit/loss of all long (buy) positions. |
|
Gets value of a table cell. |
|
Gets the sequence number of the instrument. |
|
Gets the current profit/loss of all positions (both long and short). It does not include commissions and interests. |
|
Gets the symbol of the instrument. For example, EUR/USD, USD/JPY, GBP/USD. |
|
Gets the current profit/loss of all positions (both long and short). It includes commissions and interests. |
|
Gets the unique identification number of the traded instrument. |
|
Gets the amount of short (sell) positions. |
|
Gets the average open price of short (sell) positions. |
|
Gets the current market price at which long (buy) positions can be closed. |
|
Gets the current profit/loss of all short (sell) positions. |
|
Gets the type of the table. |
|
Gets a flag indicating whether the value of the cell is changed. |