[R] TWS and R

Austin Trombley adtrombley at gmail.com
Sat May 30 00:31:56 CEST 2015


Has anyone found a solution to this?  I am having the same issue?  thanks! 

On Thursday, November 15, 2012 at 10:35:48 PM UTC-8, abcd1234 wrote:
>
> Hi all, 
>
>  The TWS on my system is unable to connect to my R session. Here is the 
> error that I'm getting: 
>
> /> tws<-twsConnect() 
> Error in socketConnection(host = host, port = port, open = "ab", blocking 
> = 
> blocking) : 
> cannot open the connection 
> In addition: Warning message: 
> In socketConnection(host = host, port = port, open = "ab", blocking = 
> blocking) : 
> localhost:7496 cannot be opened/ 
>
> Here is the session info for the R session: 
> / 
> R version 2.15.1 (2012-06-22) 
>  Platform: x86_64-pc-linux-gnu (64-bit) 
> locale: 
>  [1] LC_CTYPE=en_IN.UTF-8LC_NUMERIC=C 
>
>  [3] LC_TIME=en_IN.UTF-8LC_COLLATE=en_IN.UTF-8 
>   
> [5] LC_MONETARY=en_IN.UTF-8LC_MESSAGES=en_IN.UTF-8 
>   
> [7] LC_PAPER=CLC_NAME=C 
>
>  [9] LC_ADDRESS=CLC_TELEPHONE=C 
>
>  [11] LC_MEASUREMENT=en_IN.UTF-8 LC_IDENTIFICATION=C 
>
>  attached base packages: 
> [1] statsgraphicsgrDevices utilsdatasets 
> [6] methodsbase 
>   
> other attached packages: 
>  [1] IBrokers_0.9-10 xts_0.8-6zoo_1.7-8 
>
>  loaded via a namespace (and not attached): 
>  [1] grid_2.15.1lattice_0.20-0 tools_2.15.1/ 
>
> I have checked the "Enable Activex and Socket clients"  but it hasn't 
> helped. Since I'm running on an Ubuntu machine, I even tried changing the 
> parameter blocking in the command twsConnect() to 
>
> 1. blocking = FALSE 
>
> 2. According to the one mentioned here 
>
> http://code.google.com/p/ibrokers/source/detail?r=84&path=/trunk/R/twsConnect.R 
>   
> but nothing has helped. 
>
> I have also added 127.0.0.1 to the "Trusted IP" option. 
>
>  Please let me know what I should do. 
>
> Thanks. 
>
>
>
>
> -- 
> View this message in context: 
> http://r.789695.n4.nabble.com/TWS-and-R-tp4649699.html 
> Sent from the R help mailing list archive at Nabble.com. 
>
> ______________________________________________ 
> R-h... at r-project.org <javascript:> mailing list 
> https://stat.ethz.ch/mailman/listinfo/r-help 
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html 
> and provide commented, minimal, self-contained, reproducible code. 
>


More information about the R-help mailing list