Disable TWS automatic Logoff

Hallo,

diese kleine Tutorial zeigt ihnen,  wie sie die Interactive Brokers Traders Workstation (TWS) daran hindern können sich automatisch zu beenden. Dazu verwenden sie den IBController.

Dieses Tutorial bezieht sich auf Windows.  Auf Linux nur  .sh-Dateien anstatt  .bat-Dateien editieren.  Steps to create automatic startup and autologoff preventions are:

  1. Herunterladen freie open source Software IBController
  2. Entpacken in irgendeinen Ordner, z.B. nach c:\ibcontroller.
  3. Für jedes TWS Login, eigenen Unterordner erstellen und aussagefähig bennen.  Z.B. live_konto_972. (Die Zahl bedeutet hier die TWS Version).
  4. Kopieren der Dateien IBController/IBController.ini und IBController/IBControllerStart.bat (.sh on Linux) in diesen Unterordner.
  5. IBController.ini editieren um login nameen und password und das Flag für das Ausschalten des automatischen Logoff setzen.
  6. IBControllerStart.bat editieren und die TWS-Version setzen (Die TWS wird immer in c:\TWS\versions_nummer installiert)  und den Pfad zu IBController.ini
  7. Testen

 

Bitte installieren sie zunächst die korrekte, stabile TWS Version.  Das ist zur Zeit (Sep 2018) die Version 972.  Die stabile Version finden sie unter diesem Link:  OFFLINE TWS. (nicht OFFLINE TWS LATEST)

1– IBController Herunterladen

Wie viele Open Source Projekte findet man auch IBController unter GitHub.  Dieser Link müßte direkt funktionieren.  Ansonsten hier nach dem Master Zip suchen.

2– Unzip IBController

Einfach direkt in C:\ entpacken.  Also es muss dann ein c:\IBController geben.  : README.txt, version, userguide.pdf, etc…

3– Create configuration subfolder

for all your configurations (different IB logins (paper, real) and/or TWS startup), let’s call it: configs. So you finally have a folder

c:\IBController\configs

Now in this folder, create a subfolder for a specific configuration. In our case, this is to start TWS version 952 with the public demo login credentials.
Create folder:

         c:\IBController\configs\demo_972.

and create another folder in this subfolder, call it TWS. (This is used by TWS to store some setup.)

        c:\IBController\configs\demo_972\TWS.

 

4–Copy files

C:\IBcontroller\IBController.ini and c:\IBController\IBControllerStart.bat to config folder

          c:\IBController\configs\demo_972.

Also copy [ddownload id="1405" text="our jts.ini default file"] into this config folder.

5–Edit INI file

c:\IBController\configs\demo_972\IBController.ini.
Scroll to attribute
IbLoginId

and set the username of your account. In this case with public demo user:
IbLoginId=edemo

Scroll to attribute
IbPassword

and set the password to the password of your login. This case the password for public demo:
IbPassword=demouser

(You could also set an encryped password...)
     PasswordEncrypted=yes

To encrypt your password in this file. BUT then, you need to put the encrypted password for IbPassword parameter.

To encrypt password, open file c:\IBController\IBControllerEncrypt.bat and follow instructions. (replace ‘deomuser’ by your password,
run file in a cmd window, copy encrypted password and put behind IbPassword=.

Define the folder, where TWS is storing settings and logfiles. Use the TWS subfolder for this as argument for
attribute IbDir.

     IbDir= c:\IBController\configs\demo_972\TWS

Set the trading mode flag. For livetrading to live , for paper trading to paper. So real accounts should have this set to live. Paper accounts to paper.

TradingMode=live

Finally, set the attrib IbAutoClosedown to no. This prevents TWS from autologoff.

     IbAutoClosedown=no

 

6– Edit BAT file

c:\IBController\configs\demo_972\IBControllerStart.bat.
Set parameter TWS_MAJOR_VRSN to a version which is installed in c:\jts. In this case 972.

     TWS_MAJOR_VRSN=972

Set the path of the file IBController.ini.

     IBC_INI=c:\IBController\configs\demo_972\IBController.ini

 

7– Test it

Doubleclick on file c:\IBController\configs\demo_952\IBControllerStart.bat.. This should start TWS, do an automatic login and prevent

TWS from automatic logoff. To test this feature, in TWS open Settings/Lock and Exit

and set the time 5 Minutes to future. !Close this dialog and settings. Wait for logoff time. TWS should NOT be closed. If you reopen logsettings, you will see logoff time shifted.

 

Hopefully this tutorial can help you to run TWS more convenient and to stop it from logoff. The setup in this tutorial slightly differs from what the IBController makes recommend.
Basically, the recommend to store the config files in the users document folder and to set this folder for encryption. Of course you can do it this way. Just follow the guid, which can
be found in folder

c:\ibcontroller\userguide.pdf

 

 

 

 

Ein Gedanke zu „Disable TWS automatic Logoff“

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.