class O2GOfferTableRow

Parents
O2GOfferRow

Brief

The class provides access to the offer information and calculated fields.

Details

The class represents a single row of the Offers table. In addition to the methods of its parent class, the O2GOfferTableRow class provides methods to access calculated fields, such as cost of one pip per lot.

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

O2GOffersTable offersTable = (O2GOffersTable)tableManager.getTable(O2GTableType.Offers);

Instantiating the class

If you need access to the current offer information, get an instance of the class by calling any of the following methods of the O2GOffersTable class:

O2GOffersTable method

Syntax example

getRow

O2GOfferTableRow offer = offersTable.getRow(i);

findRow

O2GOfferTableRow offer;
bool bFound = offersTable.findRow(mOfferID, out offer);

getNextRow

O2GOfferTableRow offer;
bool bFound = offersTable.getNextRow(mIterator, out offer);

getNextRowByColumnValue

O2GOfferTableRow offer;
bool bFound = offersTable.getNextRowByColumnValue("InstrumentType", mInstrumentType, mIterator, out offer);

getNextRowByColumnValues

O2GOfferTableRow offer;
bool bFound = offersTable.getNextRowByColumnValues("PointSize", new object[] { 0.1, 0.01, 0.001 }, mIterator, out offer);

getNextRowByMultiColumnValues

O2GOfferTableRow offer;
bool bFound = offersTable.getNextRowByMultiColumnValues(new string[] { "InstrumentType", "TradingStatus" }, new object[] { mInstrumentType, mTradingStatus }, mIterator, out offer);

If you want to track the Offers 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

offersTable.subscribeUpdate(O2GTableUpdateType.Insert, tableListener);

offersTable.unsubscribeUpdate(O2GTableUpdateType.Insert, tableListener);

onChanged

offersTable.subscribeUpdate(O2GTableUpdateType.Update, tableListener);

offersTable.unsubscribeUpdate(O2GTableUpdateType.Update, tableListener);

To instantiate the O2GOfferTableRow class, you must cast the rowData parameter of the above methods to the O2GOfferTableRow type. For example,

O2GOfferTableRow row = (O2GOfferTableRow)(rowData);

Example

Get Instrument, Bid/Ask prices and Pip cost [show]

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

Public Properties

Ask

Gets the current market price an instrument can be bought at.

AskTradable

Gets the usage of an ask price.

Bid

Gets the current market price an instrument can be sold at.

BidTradable

Gets the usage of a bid price.

BuyInterest

Gets the interest amount applied to the account balance for holding a one-lot long (buy) position opened overnight.

Columns

The columns of the table.

ContractCurrency

Gets the instrument base currency.

ContractMultiplier

Gets the contract multiplier for some CFD instruments only.

Digits

Gets the instrument price precision.

High

Gets the highest ask price (buy price) of an instrument for the current trading day.

Instrument

Gets the symbol of an instrument.

InstrumentType

Gets the type of an instrument.

isAskTradableValid

Gets the flag indicating whether the AskTradable field is valid or not.

isAskValid

Gets the flag indicating whether the Ask field is valid or not.

isBidTradableValid

Gets the flag indicating whether the BidTradable field is valid or not.

isBidValid

Gets the flag indicating whether the Bid field is valid or not.

isBuyInterestValid

Gets the flag indicating whether the BuyInterest field is valid or not.

isContractCurrencyValid

Gets the flag indicating whether the ContractCurrency field is valid or not.

isContractMultiplierValid

Gets the flag indicating whether the ContractMultiplier field is valid or not.

isDigitsValid

Gets the flag indicating whether the Digits field is valid or not.

isHighValid

Gets the flag indicating whether the High field is valid or not.

isInstrumentTypeValid

Gets the flag indicating whether the InstrumentType field is valid or not.

isInstrumentValid

Gets the flag indicating whether the Instrument field is valid or not.

isLowValid

Gets the flag indicating whether the Low field is valid or not.

isOfferIDValid

Gets the flag indicating whether the OfferID field is valid or not.

isPointSizeValid

Gets the flag indicating whether the PointSize field is valid or not.

isQuoteIDValid

Gets the flag indicating whether the QuoteID field is valid or not.

isSellInterestValid

Gets the flag indicating whether the SellInterest field is valid or not.

isSubscriptionStatusValid

Gets the flag indicating whether the SubscriptionStatus field is valid or not.

isTimeValid

Gets the flag indicating whether the date and time of the last instrument update are valid or not.

isTradingStatusValid

Gets the flag indicating whether the TradingStatus field is valid or not.

isValueDateValid

Gets the flag indicating whether the ValueDate field is valid or not.

isVolumeValid

Gets the flag indicating whether the Volume field is valid or not.

Low

Gets the lowest bid price (sell price) of an instrument for the current trading day.

OfferID

Gets the unique identification number of an instrument.

PipCost

Gets the cost of one pip per lot.

PointSize

Gets the size of one pip.

QuoteID

Gets the unique identifier of the pair of prices (bid and ask) an instrument can be traded at.

SellInterest

Gets the interest amount applied to the account balance for holding a one-lot short (sell) position opened overnight.

SubscriptionStatus

Gets the subscription status.

TableType

The type of the table.

Time

Gets the date and time of the last instrument update.

TradingStatus

Gets the trading status.

ValueDate

Gets the simulated delivery date.

Volume

Gets a tick volume of the current minute.

Public Methods

getCell

Gets a cell of the table.

isCellChanged

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

back