Keep IB's TWS Running 24x5 - futures io
futures io futures trading



Keep IB's TWS Running 24x5


Discussion in Trading Reviews and Vendors

Updated by TraderSU
    1. trending_up 4,070 views
    2. thumb_up 5 thanks given
    3. group 1 followers
    1. forum 2 replies
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Keep IB's TWS Running 24x5

(login for full post details)
  #1 (permalink)
New York
 
Experience: Intermediate
Platform: NinjaTrader, Custom Platform
Broker: IB
Trading: ES, YM, Currency Futures
 
Posts: 79 since May 2010
Thanks: 46 given, 75 received

This is AutoIt (google for AutoIt 3) script that I use to keep my TWS (demo or real account) alive for ever (manual shutdown).

 
Code
Opt("TrayAutoPause", 0)
Opt("MouseCoordMode", 0) 
Opt("WinTitleMatchMode", 2)
TraySetIcon("Shell32.dll", 180)

; Demo mode
Do

    WinWaitActive("Exit Session Setting")
    WinMove("Exit Session Setting", "", Default, Default, 320, 200)

    ; Make AM to PM & PM to AM
    If @HOUR > 12 Then
        MouseClick("left", 156, 78, 1)
    Else
        MouseClick("left", 208, 78, 1)
    EndIf

    MouseClick("left", 120, 188, 1)
    Sleep(4000)

    WinClose("Exit Session Setting")

Until 1 = 2

; Never exit

 
Code
Opt("TrayAutoPause", 0)
Opt("MouseCoordMode", 0) 
Opt("WinTitleMatchMode", 2)

TraySetIcon("Shell32.dll", 180)

; Live mode
Do

    WinWaitActive("Exit Session Setting")
    WinMove("Exit Session Setting", "", Default, Default, 320, 170)

    ; Switch from AM to PM & PM to AM
    If @HOUR > 12 Then
        MouseClick("left", 157, 63, 1)
    Else
        MouseClick("left", 208, 63, 1)
    EndIf

    MouseClick("left", 120, 148, 1)
    Sleep(500)

    WinClose("Exit Session Setting")
    Sleep(2000)
    
Until 1 = 2

; Never exit

Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following 5 users say Thank You to TraderSU for this post:

Can you help answer these questions
from other members on futures io?
Any London session CL traders?
Commodities
fibonacci retracements settings not saved in investing
Traders Hideout
Delta PVP ( POC )
MultiCharts
NT8 Daily Profit & Stop Loss Limit -- Help
NinjaTrader
Why people think money can be made with magic indicator? & anyone found one yet?
Traders Hideout
 
 
(login for full post details)
  #3 (permalink)
New York
 
Experience: Intermediate
Platform: NinjaTrader, Custom Platform
Broker: IB
Trading: ES, YM, Currency Futures
 
Posts: 79 since May 2010
Thanks: 46 given, 75 received


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)

Follow me on Twitter Visit my futures io Trade Journal Reply With Quote


futures io Trading Community Trading Reviews and Vendors > Keep IB's TWS Running 24x5


July 22, 2010


Upcoming Webinars and Events
 

Bookmap

Nov TBD
     



Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts