class O2GOrderTableRow

Parents
O2GOrderRow

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 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 O2GOrdersTable class. For example,

O2GOrdersTable ordersTable = (O2GOrdersTable)tableManager.getTable(O2GTableType.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 O2GOrdersTable class:

O2GOrdersTable method

Syntax example

getRow

O2GOrderTableRow order = ordersTable.getRow(i);

findRow

O2GOrderTableRow order;
bool bFound = ordersTable.findRow(mOrderID, out order);

getNextRow

O2GOrderTableRow order;
bool bFound = ordersTable.getNextRow(mIterator, out order);

getNextRowByColumnValue

O2GOrderTableRow order;
bool bFound = ordersTable.getNextRowByColumnValue("RequestID", mRequestID, mIterator, out order);

getNextRowByColumnValues

O2GOrderTableRow order;
bool bFound = ordersTable.getNextRowByColumnValues("Type", new object[] { "L", "S" }, mIterator, out order);

getNextRowByMultiColumnValues

O2GOrderTableRow order;
bool bFound = ordersTable.getNextRowByMultiColumnValues(new string[] { "RequestID", "Type" }, new object[] { mRequestID, mType }, mIterator, out order);

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 the subscription/unsubscription syntax are listed below.

IO2GTableListener method

Subscribe syntax

Unsubscribe syntax

onAdded

ordersTable.subscribeUpdate(O2GTableUpdateType.Insert, tableListener);

ordersTable.unsubscribeUpdate(O2GTableUpdateType.Insert, tableListener);

onChanged

ordersTable.subscribeUpdate(O2GTableUpdateType.Update, tableListener);

ordersTable.unsubscribeUpdate(O2GTableUpdateType.Update, tableListener);

onDeleted

ordersTable.subscribeUpdate(O2GTableUpdateType.Delete, tableListener);

ordersTable.unsubscribeUpdate(O2GTableUpdateType.Delete, tableListener);

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]

The type defined in the fxcore2.dll assembly. The namespace is fxcore2.

Public Properties

AccountID

Gets the unique identification number of the account the order is placed on.

AccountKind

Gets the type of the account the order is placed from.

AccountName

Gets the unique name of the account the order is placed on.

Amount

Gets the amount of the order.

AtMarket

Gets the distance from the current market price within which the trader allows the order to be executed.

BuySell

Gets the direction of the trade.

Columns

The columns of the table.

ContingencyType

Gets the type of the contingent order to which the order is linked.

ContingentOrderID

Gets the unique identification number of the contingent order to which the order is linked.

ExecutionRate

Gets the price the order is executed at.

ExpireDate

Gets the expiration date and time of the order.

FilledAmount

Gets the amount of the last order portion filled.

Lifetime

Gets the time during which the trader must accept or reject the order requoted by the dealer.

Limit

Gets the price of an associated limit order (the profit limit level).

NetQuantity

Gets the Net Amount order flag.

OfferID

Gets the unique identification number of the instrument the order is placed for.

OrderID

Gets the unique identification number of the order.

OriginAmount

Gets the original amount of the order when it is placed.

Parties

Gets the unique identifier of the environment that is used to place the order.

PegOffset

Gets the offset to the pegged price.

PegType

Gets the price used to calculate the pegged order price.

PrimaryID

Gets the unique identification number of the primary order of the ELS or OTO contingent orders to which the order is linked.

Rate

Gets the price the order is placed at.

RateMax

Gets the maximum price at which the order can be filled.

RateMin

Gets the minimum price at which the order can be filled.

RequestID

Gets the identifier of the request to create the order.

RequestTXT

Gets the custom identifier of the order.

Stage

Gets the order action.

Status

Gets the state of the order.

StatusTime

Gets the date and time of the last update of the order state.

Stop

Gets the price of an associated stop order (the loss limit level).

StopTrailRate

Gets the trailing rate of an associated trailing stop order or a secondary entry stop order of an ELS order.

StopTrailStep

Gets the trailing step of an associated trailing stop order or a secondary entry stop order of an ELS order.

TableType

The type of the table.

TimeInForce

Gets the time-in-force option of the order.

TradeID

Gets the unique identification number of the position to be opened/closed by the order.

TrailRate

Gets the market price at the time the order automatically moves following the market fluctuations.

TrailStep

Gets the number of pips the market should move before the order moves the same number of pips after it.

Type

Gets the type of the order.

ValueDate

Gets the simulated delivery date.

WorkingIndicator

Gets the working indicator flag.

Public Methods

getCell

Gets a cell of the table.

isCellChanged

Gets a flag indicating whether the value of the cell is changed.

back