Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Why does TWS log off periodically?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Why does TWS log off periodically?

    Hi,

    I'm running strategies all the time and sometimes TWS just disappears and all my connection is lost.

    Is there a way I can rectify this?

    Thanks in advance!

    #2
    comfy,

    TWS automatically disconnects at a specific time once per day unfortunately. There are some unsupported work arounds however you could try.

    I would suggest doing a Google search for "TWS disable automatic log off NinjaTrader" or something to that effect.

    Unfortunately we have no officially supported way of changing this as this is Interactive Brokers software.

    Please let me know if I may assist further.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      hello Comfy,

      You have to trick TWS to avoid the autologoff:

      let's assume your TWS autologoff is at 11:00 PM
      When it's 10:50 PM, change the autologoff time to 10:49 PM (so 1 minute in the past). Now TWS will keep running for the next 24 hours until 10:49 PM the next day. Repeat procedure at 10:45PM the next day.
      To change autologoff time in TWS go to Edit/GlobalConfiguration/Configuration/Lock and Exit/ AutoLogoff Timer

      What I also did to remind me to adjust the TWS autologoff is the create a scheduled task in windows, so that each day after 10:30 PM a popup window comes in front.

      This way I'm able to run my strategies 5 days a week 24 hours a day without a single disconnect.

      Another option would be to use TWSStart which has an option to override the autologoff.


      But I like my manual approach more because in TWSStart you have to enter your tws account username and password...


      Marco
      Last edited by marcow; 07-24-2012, 09:58 PM.

      Comment


        #4
        Navigate to C:\Jts\dmqcupwtni and open TWS.xml in notepad. Set the autoLogOff value to an invalid datetime, such as this: autoLogoffTime="99999999999999:15,AM". This will prevent it from ever logging off automatically.

        Comment


          #5
          Originally posted by mrdude View Post
          Navigate to C:\Jts\dmqcupwtni and open TWS.xml in notepad. Set the autoLogOff value to an invalid datetime, such as this: autoLogoffTime="99999999999999:15,AM". This will prevent it from ever logging off automatically.
          Tested this workaround on a prevoious TWS version -and indeed it did work- ,but after 7 or 8 days TWS logged-off unexpectedly at a random time of day even without displaying the 5 min logoff screen.
          Don't know how the current version TWS behaves, but be warned !

          The path on my system is C:\Program Files (x86)\Jts\diulqqwxn\TWS.xml
          I'm on a 64 bit OS, so you may have to replace Program Files (x86) with Program Files
          If you do a search in tws.xml for AutoLogoffTime you will find: autoLogoffTime="11:00,AM" change this to the value mrdude posted.

          Marco

          Comment


            #6
            I tried to change the time but TWS, after restarting, changes the autologoff time back to "11:45,PM"!!!!!!

            Are you guys having the same problem?
            Last edited by TexFly; 10-15-2012, 11:04 PM.

            Comment


              #7
              In TWS, do you have store settings on server enabled ? this should be disabled.
              I recall that I had the issue of TWS changing back the time after modification of the XML, it turned out it was because the "virtual" time I entered was incorrect.

              MrDude posted you should change it to 99999999999999:15,AM , but i can remember I entered something else, although I'm not sure what exactly I entered.
              Maybe a google search on "disable TWS autologoff " will help you further.

              But as I posted above bewarned, TWS will eventually log of - at a random time - after a week or so, when doing the xml modification.

              I strongly recomment manually changing the Autologg off time once every 24 hours as posted above.

              Comment


                #8
                I manage to apply the xml change and TWS did not log out. I will restart it every week end. That should prevent it from randomly restart. Let's see what happens.

                Thanks for the help.

                Comment


                  #9
                  Now that it works, what time for AutoLogOff did you enter in the XML file ? Or did you use the time mrdude posted ?
                  ( This might be usefull for people reading this thread in the future )

                  If you restart TWS every weekend you won't have the random logout....;

                  Comment


                    #10
                    Ok, good idea.

                    1) Shut down TWS
                    2) Go to the c:\jts (if you have installed TWS there) and find the file tws.xml (inside one of the subfolders
                    3) Edit with Wordpad/Notepad and search "autologoff"
                    4) Change the time to "999999999:45,PM" and save (I did create a backup copy...just in case!)
                    5) Start TWS and it will stay up
                    6) Restart TWS manually once a week

                    That's my plan! It works so far...

                    Thanks for the help.

                    Comment


                      #11
                      Is this the current info for keeping TWS up and running?

                      What about the system maintainence at 12AM that requires relogging in and the secure device issue?

                      Is this workaround currently being used successfully?

                      Thank you

                      Comment


                        #12
                        if you manually set the auto logoff time to current time minus 1 minute TWS will keep running for the next 24 hours. No re-logon required. (unless the logon behaviour of TWS is country/continent specific, this should also be valid for your TWS)
                        So at 11:45AM set autologoff time to 11:44AM and TWS will keep running until the next day 11:44AM

                        During the system maintenance (only a few minutes) you may get a few connection lost warnings in NT, prepare your strategies for this so they do not disable themselves ,see post#8 in http://www.ninjatrader.com/support/f...ad.php?t=53136

                        Marco

                        Comment


                          #13
                          I recently built a new server and installed version 938.1 of TWS, and they seem to have figured out our tricks. Modifying the XML with an invalid time does not work, because it will logoff at 11:45 every night if the time is invalid. I also tried updating the time in the XML to be a time that has recently passed, but I checked the GUI and it set the time to 11:55 PM. You're also unable to modify the shutdown time in the GUI because of a glitch where a popup message keeps saying the time is invalid and you can't do anything about it until you shut down. I'm going to try a few other things, but so far version 938.1 is making me wish I had a different broker.

                          Comment


                            #14
                            I went back to the 927.7 version and it is working

                            Comment


                              #15
                              tws testing

                              Originally posted by mrdude View Post
                              Navigate to C:\Jts\dmqcupwtni and open TWS.xml in notepad. Set the autoLogOff value to an invalid datetime, such as this: autoLogoffTime="99999999999999:15,AM". This will prevent it from ever logging off automatically.
                              Good idea. I made the edits. Upon looking at the TWS app, it reset it to 11:45 pm. So unlikely to work. Will see tonight.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by NRITV, Today, 01:15 PM
                              2 responses
                              6 views
                              0 likes
                              Last Post NRITV
                              by NRITV
                               
                              Started by frankthearm, Today, 09:08 AM
                              7 responses
                              31 views
                              0 likes
                              Last Post NinjaTrader_Clayton  
                              Started by maybeimnotrader, Yesterday, 05:46 PM
                              5 responses
                              25 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by quantismo, Yesterday, 05:13 PM
                              2 responses
                              19 views
                              0 likes
                              Last Post quantismo  
                              Started by adeelshahzad, Today, 03:54 AM
                              5 responses
                              33 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Working...
                              X