Keep IB's TWS Running 24x5 | Trading Reviews and Vendors


futures.io - futures trading strategies, market news, trading charts and platforms


Trading Reviews and Vendors


Discuss and review vendors of commercial trading products, trading rooms and services, trading indicators or third-party paid add-ons




 

Keep IB's TWS Running 24x5

 

Elite Member
New York
 
Futures Experience: Intermediate
Platform: NinjaTrader, Custom Platform
Broker/Data: IB
Favorite Futures: ES, YM, Currency Futures
 
Posts: 79 since May 2010
Thanks: 46 given, 68 received

AutoIt Script To Automate IB Login


This AutoIt script will allow you to automate the TWS login for demo account.

It should also work for real account if security token is disabled (but real account's keeping username/password in a script is a bad idea). But feel free to use keep alive script after manual login.

 
Code

Opt("MouseCoordMode", 0) 

If NOT WinExists("Login") Then
    
    ; Run TWS
    ShellExecute("C:\WINDOWS\system32\javaw.exe", "-cp jts.jar;hsqldb.jar;jcommon-1.0.12.jar;jfreechart-1.0.9.jar;jhall.jar;other.jar;rss.jar -Dsun.java2d.noddraw=true -Xmx512M jclient/LoginFrame D:\Jts", "D:\Jts")

    ; Wait 
    WinWait("Login")
    
EndIf

WinActivate("Login")
Sleep(200)

MouseClick("left", 130, 55, 2)
Send("username")
Sleep(200)

MouseClick("left", 130, 80, 2)
Send("password")
Sleep(200)

; Press Login
MouseClick("left", 170, 210)

 
Page generated 2018-07-16 in 0.06 seconds with 11 queries on phoenix