public method IO2GClosedTradesTableResponseReader.getRow
Brief
Gets a row from the Closed Trades table.
Declaration | ||||
|
Parameters | |
index |
The index of the row. The index must be between |
Details
If the row is not found, the method returns null
.
Example
Get rows from the ClosedTrades table [hide]
// Get closed trades information O2G2Ptr<IO2GResponse> closedTradesResponse = loginRules->getTableRefreshResponse(ClosedTrades); O2G2Ptr<IO2GResponseReaderFactory> responseFactory = session->getResponseReaderFactory(); if (responseFactory) { O2G2Ptr<IO2GClosedTradesTableResponseReader> closedTradesReader = responseFactory->createClosedTradesTableReader(closedTradesResponse); for (int i = 0; i < closedTradesReader->size(); ++i) { O2G2Ptr<IO2GClosedTradeRow> closedTrade = closedTradesReader->getRow(i); std::cout << "TradeID = " << closedTrade->getTradeID() << " CloseRate = " << closedTrade->getCloseRate() << " GrossPL= " << closedTrade->getGrossPL() << std::endl; } }
Declared in IO2GClosedTradesTableResponseReader