[R-SIG-Finance] reqHistoricalData for comboLeg

Niklas K nk at fennoturvapalvelut.com
Sat Apr 20 09:51:00 CEST 2013


Hi,

I am trying to get historical data for a comboLeg with the following code:



  tws <- twsConnect(1)
  bag <- twsBAG(    list(
    twsComboLeg( conId = "43635367", ratio = "1", action = "BUY", 
exchange = "SMART"
      )
      ,
      twsComboLeg(  conId = "47207284", ratio = "1", action = "SELL", 
exchange = "SMART"
      )
    )
  )
  reqHistoricalData(tws, Contract=bag, barSize='1 min', duration='2 D')




For some reason it gets stuck at:
"waiting for TWS reply on USD ..."

If someone has been successfully getting data for comboLegs from IB tws 
I would be thankful for any tips.

-niklas



More information about the R-SIG-Finance mailing list