class O2GSummaryTableRow
Parents | |
|
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 O2GTableManager
. An O2GTableManager
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 O2GSummaryTable
class. For example,
O2GSummaryTable summaryTable = (O2GSummaryTable)tableManager.getTable(O2GTableType.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 O2GSummaryTable
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 the 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 instument [show]
The type defined in the fxcore2.dll
assembly.
The namespace is fxcore2
.
Public Properties | |
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 short (sell) positions can be closed. |
|
Gets the current profit/loss of all long (buy) positions. |
|
The columns of the table. |
|
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 traded instrument. For example, |
|
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. |
|
The type of the table. |
Public Methods | |
Gets a cell of the table. |
|
Gets a flag indicating whether the value of the cell is changed. |