class O2GAccountTableRow
Parents | |
|
Brief
The class provides access to the account information and calculated fields.
Details
The class represents a single row of the Accounts table. In addition to the methods of its parent class,
the O2GAccountTableRow
class provides methods to access calculated fields, such as daily profit/loss, equity, gross profit/loss, and usable margin.
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 O2GAccountsTable
class. For example,
O2GAccountsTable accountsTable = (O2GAccountsTable)tableManager.getTable(O2GTableType.Accounts);
Instantiating the class
If you need access to the current account information, get an instance of the class by calling any of the following methods of the
O2GAccountsTable
class:
|
Syntax example |
|
|
|
|
|
|
|
|
|
|
|
If you want to track the Accounts 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 the subscription/unsubscription syntax are listed below.
|
Subscribe syntax |
Unsubscribe syntax |
|
|
|
|
|
To instantiate the O2GAccountTableRow
class, cast the rowData
parameter of the above methods to the
O2GAccountTableRow
type. For example,
O2GAccountTableRow row = (O2GAccountTableRow)(rowData);
Example
Get Account ID, Equity and Usable margin [show]
The type defined in the fxcore2.dll
assembly.
The namespace is fxcore2
.
Public Properties | |
Gets the unique identification number of the account. |
|
Gets the type of the account. |
|
Gets the unique name of the account as it is displayed in the FX Trading Station. |
|
Gets the maximum amount of an order that is allowed on the account. |
|
Gets the amount of funds on the account. |
|
Gets the size of one lot. |
|
The columns of the table. |
|
Gets the amount of the profits and losses (both floating and realized) of the current trading day. |
|
Gets the amount of funds on the account, including profits and losses of all open positions (the floating balance of the account). |
|
Gets the amount of profits and losses of all open positions on the account. |
|
Gets the date and time of the last occurrence of a Margin Call. |
|
Gets the unique identification number of an account leverage profile that specifies margin requirements. |
|
Gets the equity balance of the account at the beginning of a trading day. |
|
Gets a rollover maintenance flag. |
|
Gets the type of a position maintenance. |
|
Gets the unique identification number of the funds manager account. |
|
Gets the limitation state of the account. |
|
Gets the amount of the accounting transactions that is applied to the account during the current trading day. |
|
The type of the table. |
|
Gets the amount of funds available to open new positions or to absorb losses of the existing positions. |
|
Gets the amount of funds used to maintain all open positions of the account. |
|
Gets the amount of funds used to maintain all open positions of the account with a three-level margin policy. |
Public Methods | |
Gets a cell of the table. |
|
Gets a flag indicating whether the value of the cell is changed. |