library(IBrokers)
library(ggplot2)
library(xts)
tws <- twsConnect(host = "127.0.0.1", port = 4001, clientId = 1)
version <- serverVersion(tws)
alcc <- twsEquity("ALCC", "SMART", "USD")
market_data <- reqHistoricalData(tws, Contract = alcc, barSize = "1 day", duration = "2 M")
throws
Warning: problem writing to connectionWarning: problem writing to connectionWarning: problem writing to connection
and
Error in if (curMsg == .twsIncomingMSG$TICK_PRICE) { :
argument is of length zero
Can you help me to find why there is a warning when I am using the function reqHistoricalData
.