[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-finance
Subject:    Re: [R-SIG-Finance] problem with ibrokers
From:       Jeff Ryan <jeff.a.ryan () gmail ! com>
Date:       2010-11-22 1:28:59
Message-ID: 62D28266-6233-41F5-8A66-8445C892E7DF () gmail ! com
[Download RAW message or body]

One additional point -- IBrokers captures streaming data and as R is not threaded it \
will by necessity look like it hangs. 

It is in fact running in an infinite loop - one which you can embed your trade logic. \
For all streaming data you'll need to ESC (Windows) or C-c (*nix) to break and return \
to the prompt. 

Best,
Jeff

Jeffrey Ryan    |    Founder    |    jeffrey.ryan@lemnica.com

www.lemnica.com

On Nov 21, 2010, at 6:54 PM, Stephen Choularton <stephen@organicfoodmarkets.com.au> \
wrote:

> Hi
> 
> I am trying to get to grips with iBrokers and my first problem is that it isn't \
> flowing. 
> When I try this:
> 
> tws <- twsConnect()
> > reqMktData(tws, twsEquity("CBA", exch='ASX'))
> 
> The screen hangs.  When I then hit Esc it produces the following:
> 
> TWS Message: 2 -1 2104 Market data farm connection is OK:cashfarm
> TWS Message: 2 -1 2104 Market data farm connection is OK:aufarm
> TWS Message: 2 -1 2104 Market data farm connection is OK:usfarm
> TWS Message: 2 -1 2106 HMDS data farm connection is OK:ushmds2a
> <20101122 11:47:30.688000> id=1 symbol=CBA Volume: 493943
> <20101122 11:47:30.688000> id=1 symbol=CBA highPrice: 49.14
> <20101122 11:47:30.688000> id=1 symbol=CBA lowPrice: 48.85
> <20101122 11:47:30.688000> id=1 symbol=CBA lastTimestamp: 1290385178
> <20101122 11:47:31.188000> id=1 symbol=CBA bidPrice: 48.99  bidSize: 774
> <20101122 11:47:31.188000> id=1 symbol=CBA askPrice: 49.0  askSize: 11097
> <20101122 11:47:31.188000> id=1 symbol=CBA bidSize: 774
> <20101122 11:47:31.188000> id=1 symbol=CBA askSize: 11097
> <20101122 11:47:31.204000> id=1 symbol=CBA lastPrice: 49.0
> <20101122 11:47:31.204000> id=1 symbol=CBA lastSize: 165
> <20101122 11:47:31.204000> id=1 symbol=CBA lastTimestamp: 1290386848
> <20101122 11:47:31.204000> id=1 symbol=CBA Volume: 680921
> <20101122 11:47:31.204000> id=1 symbol=CBA highPrice: 49.14
> <20101122 11:47:31.204000> id=1 symbol=CBA lowPrice: 48.85
> <20101122 11:47:31.204000> id=1 symbol=CBA closePrice: 48.81
> <20101122 11:47:31.204000> id=1 symbol=CBA openPrice: 49.05
> <20101122 11:47:31.922000> id=1 symbol=CBA optionCallVolume: 337
> <20101122 11:47:31.922000> id=1 symbol=CBA optionPutVolume: 255
> <20101122 11:47:31.922000> id=1 symbol=CBA optionCallOpenInterest: 25123
> <20101122 11:47:31.922000> id=1 symbol=CBA optionPutOpenInterest: 43334
> <20101122 11:47:31.922000> id=1 symbol=CBA optionHistoricalVol: 0.18604764474327537 \
> NA <20101122 11:47:31.922000> id=1 symbol=CBA averageVolume: 5190909
> <20101122 11:47:31.922000> id=1 symbol=CBA 13-week High: 54.15000153
> <20101122 11:47:31.922000> id=1 symbol=CBA 13-week Low: 47.91999817
> <20101122 11:47:31.922000> id=1 symbol=CBA 26-week High: 54.15000153
> <20101122 11:47:31.922000> id=1 symbol=CBA 26-week Low: 44.62139893
> <20101122 11:47:31.922000> id=1 symbol=CBA 52-week High: 57.57139969
> <20101122 11:47:31.922000> id=1 symbol=CBA 52-week Low: 44.62139893
> <20101122 11:47:31.922000> id=1 symbol=CBA shortable: 1.0
> <20101122 11:47:33.891000> id=1 symbol=CBA bidPrice: 48.99  bidSize: 767
> <20101122 11:47:33.891000> id=1 symbol=CBA askPrice: 49.0  askSize: 11090
> <20101122 11:47:33.891000> id=1 symbol=CBA bidSize: 767
> <20101122 11:47:33.891000> id=1 symbol=CBA askSize: 11090
> <20101122 11:47:33.891000> id=1 symbol=CBA lastPrice: 49.0
> <20101122 11:47:33.891000> id=1 symbol=CBA lastSize: 7
> <20101122 11:47:33.891000> id=1 symbol=CBA lastTimestamp: 1290386852
> <20101122 11:47:33.891000> id=1 symbol=CBA Volume: 680928
> <20101122 11:47:33.891000> id=1 symbol=CBA highPrice: 49.14
> <20101122 11:47:33.891000> id=1 symbol=CBA lowPrice: 48.85
> <20101122 11:47:33.891000> id=1 symbol=CBA closePrice: 48.81
> 
> > 
> 
> The example in Jeff' presentation at Meielisalp seems to imply the data should just \
> print to screen.  Can anyone help me with this? 
> 
> 
> -- 
> Stephen Choularton Ph.D., FIoD
> 
> _______________________________________________
> R-SIG-Finance@stat.math.ethz.ch 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.

_______________________________________________
R-SIG-Finance@stat.math.ethz.ch 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.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic