Hi,
I receive pretty inconsistent responses from IB using this call: m_pClient->reqHistoricalData(1001, m_contract, "", "1 D", "1 min", "TRADES", 1, 1, true, TagValueListSPtr());
There seem to be no issues w/ the m_contract setup, but nonetheless, it's set up is the following: symbol->'NQ', localSymbol->'NQZ3', exchange -> "CME", secType -> "FUT", lastTradeDateOrContractMonth -> "202312", currency "USD"
I am building responses and storing them in an std::unordered_map<std::string, std::variant<double, float, int, std::string>>, does not matter really, but the raw responses often come back with only data for the candle that just closed, and the current candle. 'time', 'open', 'high', 'low', 'close', 'volume' are the only columns I am interested in. (I am thinking of my unordered_map as a dataframe, hence the columns lingo, thanks pandas...)
I am removing the current candle so I am left with just the most recent closed candle, leaving me with 1 instead of 2 candles. Other times I get all candles of the current day. If it is 10:14:00 A.M. I get 44 candles once I sort by timestamp and remove duplicates. The useRTH, as seen above, is set to 1 so I only get from 9:30 onwards, no premarket etc. I do not know why this behavior occurs, has anyone else seen this or see why I may be getting inconsistent responses? I request in a loop every 60 seconds for the latest candle/information.
Thanks