Auto-login

Questions about MultiCharts and user contributed studies.
Algyros
Posts: 52
Joined: 28 Sep 2009
Location: Austin, TX
Has thanked: 1 time
Been thanked: 5 times

Auto-login

Postby Algyros » 30 Sep 2009

Is it possible to auto-login to IB from Multicharts (so that I don't have to turn on TWS every morning to auto-trade)?

User avatar
TJ
Posts: 7458
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 999 times
Been thanked: 2137 times

Postby TJ » 30 Sep 2009

TWS is the interface to your account at IB.
it performs the authentication function;
you must run TWS to access your account.

User avatar
TJ
Posts: 7458
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 999 times
Been thanked: 2137 times

IB offering gateway access (API without TWS)

Postby TJ » 11 Mar 2010

IB offering gateway access (API without TWS)

From the beta notes for TWS 9.04:

Alternative Access for API

API customers can now elect to run the IB Gateway access method instead of TWS to connect their API with the IB trading system. The gateway supports the same functionality as TWS, but does not include a graphical user interface and consequently uses approximately 40% less system resources. API users can elect to run TWS when they want to view and manage API orders, or the IB Gateway when they have no need for the TWS interface.

Access the IB Gateway the same way you would the TWS; download and run a standalone version if you prefer to upgrade versions manually, or use the browser-based version from the Login menu to run the current production version.

Go to:

http://www.interactivebrokers.com/en/p. ... entity=llc
click on Beta Notes

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

Postby Bruce DeVault » 12 Mar 2010

Various aftermarket / 3rd party tools offer automation to log you into TWS and keep you logged in, but it's a bit of a hassle. In the past IB's policy has been that you should be there to authorize each connection, which puts them slightly at odds with the desire to have 100% automation.

The IB Gateway option is a good step forward. TWS has gotten increasingly "heavy" over time and a step back from that is a real improvement.

janus
Posts: 802
Joined: 25 May 2009
Has thanked: 46 times
Been thanked: 94 times

Re: IB offering gateway access (API without TWS)

Postby janus » 13 Mar 2010

I like using tws to close orders in an emergency if and when MC stuffs up. It hasn't thus far but I like the idea of having tws there just in case. It also allows me to view the orders coming through for peace of mind that the orders did actually get acted on by IB. If all this can be done with the new gateway tool then great - I will have a look. Otherwise, no thanks.

janus
Posts: 802
Joined: 25 May 2009
Has thanked: 46 times
Been thanked: 94 times

Postby janus » 13 Mar 2010

Various aftermarket / 3rd party tools offer automation to log you into TWS and keep you logged in, but it's a bit of a hassle. In the past IB's policy has been that you should be there to authorize each connection, which puts them slightly at odds with the desire to have 100% automation.
That's right, writing an automatic tool to work with IB's challenge-response method although possible would be challenging. I written a tool to do it for the simpler single password method for the simulation account thinking I could use it on the real one. I then realized it's not so unless one requests to have it downgraded to a single password, which I wouldn't recommend. I now don't mind the challenge-response method as it provides much better security, which is far more important than trying to save a bit of typing each day.

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

Postby Bruce DeVault » 13 Mar 2010

The real rub comes in where TWS crashes, or your power goes out and the computer reboots after the UPS has a finite number of minutes of battery life, and if you're striving for full automation, there's no way to programmatically get TWS back up and running and pick up where you left off. It would be nice if they supported this more so than they do, but they really don't as a matter of policy (for liability, they want you to authorize each connection), therefore, it's important to simply state for now that IB's automation needs to be attended in order to handle these kinds of circumstances.

User avatar
TJ
Posts: 7458
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 999 times
Been thanked: 2137 times

Postby TJ » 13 Mar 2010

there are utilities
that can restart TWS and re-log in your password
without your intervention.
(I think the name is twsstart)

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

Postby Bruce DeVault » 13 Mar 2010

Yes that's one example, and why I mentioned various 3rd party add-ons upthread. But this requires you to opt out of secure card / secure id, and is an imperfect solution at best - I've watched IB break these macro-type programs several times over the past few years, whether it's on purpose or not, by changing the way the login screen works, so it's a sort of constant cat and mouse game as long as they have no direct support for logging in and programs like these have to identify the window, pretend to type in keystrokes, etc.

janus
Posts: 802
Joined: 25 May 2009
Has thanked: 46 times
Been thanked: 94 times

Postby janus » 13 Mar 2010

so it's a sort of constant cat and mouse game as long as they have no direct support for logging in and programs like these have to identify the window, pretend to type in keystrokes, etc.
I can understand the need to have an automatic login utility. It's not so much to save typing but to overcome situations where there's an outage and there's a requirement to login back again while the user is not present. With the IB's challenge-response password system, it's not that simple although doable. To keep this high security approach intact, one could encrypt all the challenge-password pairs in a file and the automatic utility will upon initial start-up use the same approach and ask the user to enter the correct password after being challenged. From then on the automatic utility will take over and response with the correct password each time the IB tws login requests it. This will take care of disconnections. What it won't take care of is if the PC is shutdown when the power is lost. Even if one used a UPS there's always a limit to how long it can remain on without mains power. All in all, I rather not take any chances and not rely on an automatic login utility to auto-trade without my presence. Although I use the automatic trading features of MC I never leave the PC for too long in case something happens. Instead I use the automated features for discipline trading purposes. If I suffer a significant outage I will call the dealing desk and close out any open positions - that's something that can't be automated, at least not yet. What I'm working on at the moment is to develop an alert system such that if there is an outage I will receive an SMS on my phone so I can then call the dealing desk to check what's happening and take appropriate action, including if necessary telling them to logout my session for me and closing any open contracts. Even this is not 100% reliable. What if the alert system fails? What if the phone provider suffers an outage? What if..... One way to reduce such concerns to a minimum is to send a heartbeat SMS every 30 minutes to say all systems are OK. I think the best approach is just to have a close eye on the PC and be done with all this extravagance, which need only backfire once to cause more trouble than it's worth.

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

Postby Bruce DeVault » 14 Mar 2010

It isn't just about power outages - IB will disconnect you by force once every 24 hours. While you can adjust the time of day this happens, you can't make it not happen, so the only known way to stay connected without having to log back in would be to keep changing the time of day to disconnect to be ahead of the current time on a continual basis.

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

Postby Spaceant » 14 Mar 2010

Janus,

Are you using IB? I love your idea to send a regular SMS to your phone. In fact, I thought of this a few months ago with IB as my broker, but couldn't figure out how to do it.

Sa

Emmanuel
Posts: 337
Joined: 21 May 2009
Has thanked: 106 times
Been thanked: 25 times

Postby Emmanuel » 15 Mar 2010

Hi Spaceant

I find that SMS is one solution, but you can not run it automatically, and it is not direct enough from your computer to you.

on my part, I prefer to send a
flag file to a web server over internet, every minute from MC via FTP.

In this file, MC, is telling, the last time of the data, the status of the broker,
if an order is present, I can put anything in this file

My phone is checking the web server, the file, every minute.

If phone see the file is more than 2 min old, or is one of the flag is not correct, my phone ring.

I tested the most important part of it, it work. it is fully automatic, you can be anywhere. the phone tell you immediatly if one of the flag on your computer is not correct.

A phone is easy to program, if you have window mobile on it.

I am planning to finish at the beginning of april.

This is better because it is running 24/7.

Emmanuel

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

Postby Bruce DeVault » 15 Mar 2010

The easiest way to send an SMS is to email your phone's SMS gateway (e.g. http://www.mutube.com/projects/open-ema ... eway-list/). You can make the latency more predictable by using a modem, but that's generally not the right thing to do these days.

brendanh
Posts: 158
Joined: 07 Apr 2007
Has thanked: 1 time

Postby brendanh » 15 Mar 2010

I opt out of the security device, login at the beginning of the week, and then toggle the AM/PM every 12 hours using AutoHotKey.

There has to be a balance between security and usability. Getting out of bed hours earlier every morning to switch on autotrading swings it too far towards security.


Return to “MultiCharts”