public method O2GClosedTradesTable.getNextRowByColumnValue
Brief
Gets the next row from O2GClosedTradesTable
based on the column value.
Declaration | ||||
|
Parameters | |
columnId |
The name of a column in the Closed Trades table. For example, |
columnValue |
The value of the column specified by the |
iterator |
The table iterator. |
Details
If the row is not found, the method returns null
.
Note: The returned row contains the current column values. The values are not automatically updated. To monitor changes, use IO2GTableListener.onChanged
.
The row interface is thread-safe. The returned row can be used in different threads without synchronization.
Example
Get closed positions in EUR/USD
from the Closed Trades table [hide]
O2GClosedTradesTable closedTradesTable = (O2GClosedTradesTable)tableManager.getTable(O2GTableType.CLOSED_TRADES); boolean found = false; O2GTableIterator iterator = new O2GTableIterator(); O2GClosedTradeTableRow closedTrade = closedTradesTable.getNextRowByColumnValue("OfferID", "1", iterator); while (closedTrade != null) { found = true; System.out.println("TradeID: " + closedTrade.getTradeID() + " CloseRate = " + closedTrade.getCloseRate() + " GrossPL= " + closedTrade.getGrossPL()); closedTrade = closedTradesTable.getNextRowByColumnValue("OfferID", "1", iterator); } if (!found) { System.out.println("You don't have any positions in EUR/USD instrument closed during the current trading day."); }
Declared in O2GClosedTradesTable