
Yes, thank you Soren - I think you were on the right lines. 

I was using the same TWS object to request live data through

reqMktData(tws, Contract=assets, eventWrapper=eWrapper.MktData.CSV(n.mkts), file=files)

and I think as a result of this, I was returned the aforementioned error.

Now I declare a separate TWS object through

tws2 <- twsConnect(clientId=2);

and use tws2 to place orders through placeOrders(tws2..... ), and then request open orders through

IBrokers::reqOpenOrders(tws2)


the correct output is returned directly to the console but which then hangs..... Only escaping then allows me to use to console again.

Would you be able to advise of a way to output the data to say a text file, such that my R console is not affected ?

Many thanks again & Kind Regards,

Sash



> Date: Mon, 13 Feb 2012 18:09:34 +0100
> From: me@censix.com
> To: sashinali79@hotmail.com
> CC: r-sig-finance@r-project.org
> Subject: Re: [R-SIG-Finance] IBrokers reqOpenOrders
> 
> I am guessing, but this error looks like it is related to the actual
> connection you are trying to establish with the TWS. 
> 
> I have been using reqOpenOrders() without problems for a
> while now.
> 
> Cheers
> 
> Soren
> 
> 
> 
> On Mon, 13 Feb 2012 12:27:47 +0000
> Sash Ali <sashinali79@hotmail.com> wrote:
> 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Hi folks,
> > 
> > I've been using the IBrokers package to automate placing market,
> > stop, and limit orders into my trading account. However, I have a
> > number of stop and limit orders that have not been hit and would like
> > to automate the canceling of these.
> > 
> > I am unable to find the required tools in the IBrokers documentation
> > or on forums. However, I have discovered a brief mention on this
> > forum on the 'reqOpenOrders' function but I can find only limited
> > information on how to use it. 
> > 
> > I have tried the following,
> > 
> > tws <- twsConnect(clientId=1);
> > IBrokers::reqOpenOrders(tws)
> > 
> > However, the output is 
> > 
> > Error in e_tick_size(NULL, msg, timestamp, file, symbols, ...) : 
> >   argument "file" is missing, with no default
> > 
> > - which I do not understand.
> > 
> > I would be grateful for any help.
> > 
> > Sash
> > 
> > 
> >  		 	   		  
> > 	[[alternative HTML version deleted]]
> > 
> > _______________________________________________
> > R-SIG-Finance@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only. If you want to post, subscribe first.
> > -- Also note that this is not the r-help list where general R
> > questions should go.
> 
 		 	   		  
	[[alternative HTML version deleted]]

