public method IO2GRequestFactory.fillMarketDataSnapshotRequestTime

Brief

Fills the date/time range of the market data snapshot.

Declaration
C++
virtual void  fillMarketDataSnapshotRequestTime (IO2GRequest * request, DATE timeFrom, DATE timeTo) = 0

Parameters
request

The request object previously created using the createMarketDataSnapshotRequestInstrument method.

timeFrom

The date and time to get the snapshot from.

timeTo

The date and time to get the snapshot to.

isIncludeWeekends

Defines whether weekend price data will be requested from the server. If the value is true, the market data will include weekend price data. Note: if it is not specified in a request that isIncludeWeekends==true, the response may contain less bars than it was originally specified in the request in maxBars.

If the value is false, the market data will include data from Monday through Friday.

Details

fillMarketDataSnapshotRequestTime [hide]

 IO2GRequestFactory *factory = session->getRequestFactory();
 IO2GTimeframeCollection *timeframe_collection = factory->getTimeFrameCollection();
 IO2GTimeframe *timeframe = timeframe_collection->get("m1");
 timeframe_collection->release();
 IO2GRequest *request = factory->createMarketDataSnapshotRequestInstrument(instrument.c_str(), timeframe, 300);
 factory->fillMarketDataSnapshotRequestTime(request, 0, 0);
 session->sendRequest(request);
 //...
 request->release();
 timeframe->release();
 factory->release();

fillMarketDataSnapshotRequestTime is the last step to get historic prices and used after createMarketDataSnapshotRequestInstrument.

Both dates and time are in the OLE Automation date format.

An OLE Automation date is implemented as a floating-point number whose integral component is the number of days before or after midnight, 30 December 1899, and whose fractional component represents the time on that day divided by 24.

The date/time is in the UTC time zone.

If timeTo is 0, the server will send most recent data.

If timeFrom is 0, the server will send the maximum number of bars specified in the request.

If timeFrom is not 0 but the chosen date rage contains more bars than the maximum number of bars, the maximum number of bars will be returned ending at the specified dateTo.

Declared in IO2GRequestFactory

back