IB Gateway

Questions about MultiCharts and user contributed studies.
SP
Posts: 465
Joined: 06 Feb 2006
Has thanked: 36 times
Been thanked: 286 times

IB Gateway

Postby SP » 11 Apr 2010

Will there any advantages of using the new IB Gateway instead of the complete TWS?

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: IB Gateway

Postby TJ » 11 Apr 2010

Will there any advantages of using the new IB Gateway instead of the complete TWS?
1. data feed & backfills seems faster
2. You can get around TWS timed shutdown

moneymaker
Posts: 33
Joined: 08 May 2006
Location: Germany

Postby moneymaker » 11 Apr 2010

Hi,

could you tell me more about the new IB Gateway? I hear the first time about it.

User avatar
geizer
Posts: 375
Joined: 16 Jun 2008
Has thanked: 40 times
Been thanked: 38 times

Postby geizer » 11 Apr 2010

When you download and install the latest (not beta) TWS from interactive brokers website, the IB gateway will be automatically installed with it.

The IB gateway will not be installed if you just update your previously installed TWS. Once installed you can see what this is.

Emmanuel
Posts: 355
Joined: 21 May 2009
Has thanked: 109 times
Been thanked: 28 times

Postby Emmanuel » 11 Apr 2010

Hi,

Thank you TJ, Thank you Geizer, for this information.

This is interesting if you can get around TWS timed shutdown

Maybe , it is more stable ?

User avatar
Bruce DeVault
Posts: 438
Joined: 19 Jan 2010
Location: Washington DC
Been thanked: 2 times
Contact:

Postby Bruce DeVault » 14 Apr 2010

TWS has suffered over the years from what developers call "creeping featurism". This happens to all large software projects when users request this feature and that feature hundreds of times over the years and they're added as time permits and based on things like voting (formal or informal), but without a central, disciplined, organized driving vision for what it's going to be and what it's going to do.

(Incidentally, trading platforms frequently suffer from this as well, and it's one of the biggest problems with having new features driven primarily by things like polls - that's why the most long-term successful projects often still have some features that are frequent requests by users but aren't immediately implemented because the architecture team understands they would be a problem in the way users do not - the best thing they can do in this case is to try to articulate clearly what their vision is and why these suggestions aren't good candidates for adoption at this stage but the worst thing they can do is simply accept polls at face value and implement the changes for the short term "thanks" but introducing significant long-term problems.)

As a consequence, these projects get more and more complex, and harder and harder to support and maintain. Larger and larger trading-related software projects tend to run more and more slowly on the same hardware and with responsiveness in fast market conditions that's harder to predict, because there are so many different things that could be factors, and when there are problems, it's hard to figure out what's at the cause because there are so many moving parts, and a lot of thought was not necessarily given at the outset to what the design was going to be.

The good thing about something like IB Gateway is it seems to have a very concise vision - to provide API connectivity with basically no user interface and minimal logging. As such, although they may add things like other settings for connection to it, it's looking at this stage unlikely to become the sort of creature that TWS is, and thus, reliability still seems likely to be greater in the long run.

And if users demand more and more features be added to IB Gateway like tabs for the orders, positions, tabs for real-time quotes on the symbols in question, buttons to override this or that, buttons to close out their positions (then more buttons to let them specify if it's at market or with a limit, then more buttons to let them specify if the limit isn't filled, whether to chase, etc., etc., etc., etc.) and they have the poor judgment to do many of those things, they'll eventually have to come up with a new, basic version yet again to just provide reliable API connectivity now that the new version is so complex they can't be 100% sure what's wrong with it anymore, to try to get back to where they should never have left in the first place.

It's good in a way that TWS is becoming more full-featured from the perspective of the average IB trader - but it's at somewhat contrary purposes to the needs of platforms like MultiCharts, which have their own user interface designs and their own way of handling many of the same tasks (this will be especially true in the next versions of MultiCharts when manual order entry is then supported). What MultiCharts needs out of IB is a stable, reliable API interface - not a huge, continually changing Java application striving to be its own platform and with updates every week that may or may not break everything or introduce yet more hard to track down differences in behavior. That's why there's such a potential gain to be had by using IB Gateway, as it gets to be better known - it's simpler, and therefore, more knowable and likely in the long run (at least, as far as we can see at this early stage), more stable through simple design.

SUPER
Posts: 646
Joined: 03 Mar 2007
Has thanked: 106 times
Been thanked: 84 times

Postby SUPER » 14 Apr 2010

IB Gateway looks cool, unfortunately there is not much information on IB website on how to set it up.

Anyone knows how to set it up with MC?

User avatar
Bruce DeVault
Posts: 438
Joined: 19 Jan 2010
Location: Washington DC
Been thanked: 2 times
Contact:

Postby Bruce DeVault » 14 Apr 2010

It should not require much to get it going. If you have trouble, you can change the default port from 4001 to TWS's default of 7496.

SUPER
Posts: 646
Joined: 03 Mar 2007
Has thanked: 106 times
Been thanked: 84 times

Postby SUPER » 14 Apr 2010

Bruce,

Many thanks for your suggestion, I am not able to receive any quotes and also it seems APIClient is not connected any suggestions please.

See attached image.

Regards
Super
Attachments
IB-Gateway.jpg
(197.54 KiB) Downloaded 2403 times

janus
Posts: 835
Joined: 25 May 2009
Has thanked: 63 times
Been thanked: 104 times

Postby janus » 14 Apr 2010

It should not require much to get it going. If you have trouble, you can change the default port from 4001 to TWS's default of 7496.
Yes, that's the trick. I'm puzzled as to why they use 4001 for the API socket - must be a mistake. Anyway, I'll stick to using the full tws as I like to keep track of the orders as they go through, and if necessary close them out manually if something goes wrong with MC.

NiC72
Posts: 111
Joined: 02 Nov 2009
Location: Sweden
Has thanked: 39 times
Been thanked: 14 times

Postby NiC72 » 16 Apr 2010

I think IB Gateway works great. But, as Janus, missing the ability to close the orders manually.
When I run the test signal, I can not set the Automatic Order Execution day before to run when the stock market opens. It appears that the IB Gateway closes down sometime between 5.00-6.00 (GMT).
Anyone else experienced the same?

Spaceant
Posts: 254
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Postby Spaceant » 17 Apr 2010

There is one saying: A needle can't be sharpened in both ends.

While IB Gateway seems to be attractive as it uses lower computer resources, I tend to agree with Janus that I may not use it in real autotrading as it provides no 'gateway' to close the position just in case anything happens.

Perhaps, we can use IB Gateway to autotrade with MC in one computer to minimize the computer resources usage while we use the second IB login to turn on TWS in another computer to monitor / close position if necessary.

Sa

janus
Posts: 835
Joined: 25 May 2009
Has thanked: 63 times
Been thanked: 104 times

Postby janus » 17 Apr 2010

Perhaps, we can use IB Gateway to autotrade with MC in one computer to minimize the computer resources usage while we use the second IB login to turn on TWS in another computer to monitor / close position if necessary.
Sa
I run the full version of tws and have no problems with lack of resources. Often I also have Outllok, and two other real-time trading systems running, plus I do some web browsing. Memory usage goes to about 1.5 GB but I have 2 GB of RAM so everything is fine. However, I intend to purchase another PC and dedicate the existing one just for trading as I like to minimize the possibility of virus infection via email or web browsing. The new and faster PC will be used for development work with MC to speed things up.

User avatar
Bruce DeVault
Posts: 438
Joined: 19 Jan 2010
Location: Washington DC
Been thanked: 2 times
Contact:

Postby Bruce DeVault » 17 Apr 2010

Once MC has the ability to manually enter trades/monitor position/close position in coming releases, this may be less of an issue than it is today, although there will always be a desire to see the same information from multiple angles for reassurance and control.

janus
Posts: 835
Joined: 25 May 2009
Has thanked: 63 times
Been thanked: 104 times

Postby janus » 17 Apr 2010

Once MC has the ability to manually enter trades/monitor position/close position in coming releases, this may be less of an issue than it is today, although there will always be a desire to see the same information from multiple angles for reassurance and control.
I can do all that now using my own dll extension to MC. However, as you alluded to, it's wise to have an alternative way to perform these functions. If MC and/or my dll stops working for whatever reason, I at least have another way to close out my contracts using tws. If all of them fail (eg, my network connection fails) I can resort to phoning IB. Actually, I have another internet connection (3G wireless) so I can switch over to that before resorting to phoning IB - it takes about 1-2 minutes to be back on-line during my tests. Note I don't have to restart anything - just unplug the network cable, enable my wireless connection that's already in standby mode and wait for things to re-establish themselves.

User avatar
Bruce DeVault
Posts: 438
Joined: 19 Jan 2010
Location: Washington DC
Been thanked: 2 times
Contact:

Postby Bruce DeVault » 17 Apr 2010

If internet connection disruption is your concern, you might want to consider a dual WAN router as these can re-route automatically - they're quite economical now, and it's possible to configure them with one side being an AT&T/Sprint/Verizon wireless - we actually have something like that here. When so configured, and the primary ISP has downtime, the computers downstream don't realize it's been switched (there's no local IP change or anything like that) - the routing simply changes. This does sometimes result in disconnect/reconnect cycles in software like TWS, depending on whether the connections are TCP or not, and how long the disruption lasts, but it's more an experience like an ISP going down for a few minutes then coming back on its own than like an experience of a human being having to get in there and move cables around. In the past we've conducted tests with live broker connections that survived cable modems being unplugged etc. all on their own and various platforms continued auto-trading.

janus
Posts: 835
Joined: 25 May 2009
Has thanked: 63 times
Been thanked: 104 times

Postby janus » 17 Apr 2010

Yes, I have one of those too. However, I haven't configured it. I may do so one day by subscribing to a second cable ISP. My 3G wireless is from the same ISP as my cable but it does provide some redundancy as I've noticed my cable go down once but the wireless was OK. No doubt it could happen to other way too.

sptrader
Posts: 742
Joined: 09 Apr 2010
Location: Texas
Has thanked: 483 times
Been thanked: 274 times
Contact:

Postby sptrader » 17 Apr 2010

Can someone recommend a cost effective dual WAN router ? I've been considering going that route too.

User avatar
Bruce DeVault
Posts: 438
Joined: 19 Jan 2010
Location: Washington DC
Been thanked: 2 times
Contact:

Postby Bruce DeVault » 17 Apr 2010

This hardware niche has gotten a lot more competitive lately. There are many inexpensive options available. Try http://www.google.com/products?q=%22dua ... &scoring=p to get a feel for what's available.

sptrader
Posts: 742
Joined: 09 Apr 2010
Location: Texas
Has thanked: 483 times
Been thanked: 274 times
Contact:

Postby sptrader » 17 Apr 2010

Thanks Bruce- Wow those dual wan router prices are great, looks like $100 would do it.
After further checking them out, most do not offer wireless with dual Lan, that's unfortunate. The one that did, had many complaints of disconnects. I guess my search will continue. I need reliability.

PD Quig
Posts: 191
Joined: 27 Apr 2010
Location: San Jose
Has thanked: 67 times
Been thanked: 10 times

Postby PD Quig » 27 Apr 2010

Thanks Bruce- Wow those dual wan router prices are great, looks like $100 would do it.
After further checking them out, most do not offer wireless with dual Lan, that's unfortunate. The one that did, had many complaints of disconnects. I guess my search will continue. I need reliability.
I've been using a Draytek Vigor 2910G wireless dual WAN router for a while and it has been great. Easy to install and configure. Zero down time in four months with Comcast cable as the primary and AT&T DSL as the failover. I think I paid a little over $200, but you can probably do better by now.

sptrader
Posts: 742
Joined: 09 Apr 2010
Location: Texas
Has thanked: 483 times
Been thanked: 274 times
Contact:

Postby sptrader » 27 Apr 2010

Thanks PD Quig !! I'll check into it.

User avatar
Henrik
Posts: 140
Joined: 13 Apr 2010
Has thanked: 25 times
Been thanked: 11 times

Postby Henrik » 27 Apr 2010

Actual IB Gateway (v904) doesn't connect to MC, but previous version (v903) works excellent.

User avatar
geizer
Posts: 375
Joined: 16 Jun 2008
Has thanked: 40 times
Been thanked: 38 times

Dual WAN Router

Postby geizer » 27 Apr 2010

Cisco RV042 is a Dual-WAN: http://www.cisco.com/en/US/products/ps9925/index.html

Alternatively, there are DIY solutions:

Get a Linksys WRT54GL for $70, and load DD-WRT firmware: http://en.wikipedia.org/wiki/DD-WRT
Next, use the following guide to enable Dual WAN: http://www.roadrunnerguide.com/dualwan.html

OR you can go with Routerboard: http://routerboard.com/
and use these guides to start:
http://wiki.mikrotik.com/wiki/PCC#Introduction
http://wiki.mikrotik.com/wiki/ECMP_load ... masquerade
http://wiki.mikrotik.com/wiki/Per-Traff ... _Balancing
http://wiki.mikrotik.com/wiki/Load_Bala ... e_Gateways

=======
The advantage of both of the above DIY methods is that besides the Dual-WAN routing capabilities you get very powerful and highly customizable router that is capable to perform many other useful functions. Some of the examples are: running light web server, Ad blocking using your own(or subscription) hosts lists. And you are not limiting yourself to dual WAN. You can go triple WAN (or more) if you wish. Of course all of the above is possible if you know what you need and how to set-it up.

The Disadvantage of above methods is "Do It Yourself" :)
--
Pavel

sptrader
Posts: 742
Joined: 09 Apr 2010
Location: Texas
Has thanked: 483 times
Been thanked: 274 times
Contact:

Postby sptrader » 27 Apr 2010

Thanks Pavel - Geizer -
I might try the WRT54GL method with updated firmware, looks interesting. I'm not a network guy but I've hooked up several wireless routers before and I build all of my own computers, so I think I can handle it.
I found the router advertised at Wal-Mart for $56.

User avatar
geizer
Posts: 375
Joined: 16 Jun 2008
Has thanked: 40 times
Been thanked: 38 times

Postby geizer » 27 Apr 2010

Thanks Pavel - Geizer -
I might try the WRT54GL method with updated firmware, looks interesting. I'm not a network guy but I've hooked up several wireless routers before and I build all of my own computers, so I think I can handle it.
I found the router advertised at Wal-Mart for $56.
Is Wall-Mart selling WRT54GL ?
"L" stands for Linux. This router slightly more expensive than regular WRT54G...
If Wall-Mart sells regular WRT54G, look careful at the version of the router (on the package next to S/N): There are roughly 8 versions of WRT-54G. All of them different - some of them will support DD-WRT firmware, and some will not. These links have detailed information:http://dd-wrt.com/wiki/index.php/Supported_Devices
http://en.wikipedia.org/wiki/Linksys_WR ... ies#WRT54G

Long story short there are dozens of Linksys routers that will support DD-WRT, but not all are tested with Dual-WAN. The safe bet to go with those that are reported by users of the DD-WRT community and known to be working as Dual-WAN. WRT54GL is a safe bet and a rock solid performer. It's also a favorite pick for many small networks by consultants where reliability is a must. In my city it sells for $70 and Wall-Mart does not stock the L model.

TigerDirect sells for $65.
Take a close look at what people saying about it:
http://www.tigerdirect.com/applications ... CatId=2667

Anyway, Good luck with this if you decide to go this route.
--
pavel

sptrader
Posts: 742
Joined: 09 Apr 2010
Location: Texas
Has thanked: 483 times
Been thanked: 274 times
Contact:

Postby sptrader » 27 Apr 2010

Geiser- Yes, the GL- only sold online though.

http://www.walmart.com/search/search-ng ... 0&Find.y=0

User avatar
geizer
Posts: 375
Joined: 16 Jun 2008
Has thanked: 40 times
Been thanked: 38 times

Postby geizer » 04 May 2010

Geiser- Yes, the GL- only sold online though.

http://www.walmart.com/search/search-ng ... 0&Find.y=0
sptrader,

If you still interested here is another link for Dual-WAN with fail-over based on DD-WRT, which I think is more relevant : http://www.dd-wrt.com/wiki/index.php/Du ... h_failover

sptrader
Posts: 742
Joined: 09 Apr 2010
Location: Texas
Has thanked: 483 times
Been thanked: 274 times
Contact:

Postby sptrader » 05 May 2010

Geiser- Yes, the GL- only sold online though.

http://www.walmart.com/search/search-ng ... 0&Find.y=0
sptrader,

If you still interested here is another link for Dual-WAN with fail-over based on DD-WRT, which I think is more relevant : http://www.dd-wrt.com/wiki/index.php/Du ... h_failover
*Thanks Geizer- Perfect timing, I received the router yesterday and will try the dual wan setup this weekend , if I have time.


Return to “MultiCharts”