class IO2GOrderTableRow
Parents | |
IO2GOrderRow |
Brief
The class provides access to the order information and calculated fields.
Details
The class represents a single row of the Orders table. In addition to the methods of its parent class,
the O2GOrderTableRow
class provides methods to access calculated fields, such as prices of an associated stop/limit order,
and trailing rate/step of an associated trailing stop order or a secondary entry stop order of an ELS order.
Prerequisites
The class is available only through the use of the IO2GTableManager
. The 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 IO2GOrdersTable
class. For example,
O2GOrdersTable ordersTable = (O2GOrdersTable)tableManager.getTable(O2GTable::Orders);
Instantiating the class
If you need access to the current order information, get an instance of the class by calling any of the following methods of the IO2GOrdersTable
class:
|
Syntax example |
|
|
|
|
|
|
|
|
|
|
|
If you want to track the Orders 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 O2GOrderTableRow
class, you must cast the rowData
parameter of the above methods to the O2GOrderTableRow
type. For example,
O2GOrderTableRow row = (O2GOrderTableRow)(rowData);
Example
Get Order ID and prices of associated stop/limit orders [show]
Public Methods | |
Gets the columns of the table. |
|
Gets the unique identification number of the account the order is placed on. |
|
Gets the type of the account the order is placed from. |
|
Gets the unique name of the account the order is placed on. |
|
Gets the amount of the order. |
|
Gets the distance from the current market price within which the trader allows the order to be executed. |
|
Gets the direction of the trade. |
|
Gets value of a table cell. |
|
Gets the type of the contingent order to which the order is linked. |
|
Gets the unique identification number of the contingent order to which the order is linked. |
|
Gets the price the order is executed at. |
|
Gets the expiration date and time of the order. |
|
Gets the amount of the last order portion filled. |
|
Gets the time during which the trader must accept or reject the order requoted by the dealer. |
|
Gets the price of the associated limit order (the profit limit level). |
|
Gets the Net Amount order flag. |
|
Gets the unique identification number of the instrument the order is placed for. |
|
Gets the unique identification number of the order. |
|
Gets the original amount of the order when it is placed. |
|
Gets the unique identifier of the environment that is used to place the order. |
|
Gets the offset to the pegged price. |
|
Gets the price used to calculate the pegged order price. |
|
Gets the unique identification number of the primary order of the ELS or OTO contingent orders to which the order is linked. |
|
Gets the price the order is placed at. |
|
Gets the maximum price at which the order can be filled. |
|
Gets the minimum price at which the order can be filled. |
|
Gets the identifier of the request to create an order. |
|
Gets the custom identifier of the order. |
|
Gets the order action. |
|
Gets the state of the order. |
|
Gets the date and time of the last update of the order state. |
|
Gets the price of the associated stop order (the loss limit level). |
|
Gets the trailing rate of the associated trailing stop order or secondary entry stop order of an ELS order. |
|
Gets the trailing step of the associated trailing stop order or secondary entry stop order of an ELS order. |
|
Gets the type of the table. |
|
Gets the time-in-force option of the order. |
|
Gets the unique identification number of the position to be opened/closed by the order. |
|
Gets the market price at the time the order automatically moves following the market fluctuations. |
|
Gets the number of pips the market should move before the order moves the same number of pips after it. |
|
Gets the type of the order. |
|
Gets the simulated delivery date. |
|
Gets the working indicator flag. |
|
Gets a flag indicating whether the value of the cell is changed. |