Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Interactive Brokers and Auto Trading

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

    Interactive Brokers and Auto Trading

    I've searched for threads on IB and auto trading and have some questions:
    1) I read that TWS must be running for NT to trade IB accounts. Is that correct?
    2) I read that TWS requires you to log in every day. The big problem with this is that when you re-connect with NT, then all running strategies in NT will be disabled and must be re-enabled. That is a big problem as I run about 10 strategies and would have to manually re-enable them every day?
    3) If you do have to re-enable strategies then can you do it quickly through the strategy manager rather than going into a chart window?
    4) Are there any other issues with auto-trading via IB?

    #2
    tradetree, yes the TWS needs to be running and connected to NT. I believe you can google for a tool called TWSStart that would change the logoff time for you...strategies would be persisted also with our NT7 version, so you would just need to reenable them then.

    Yes, you can start them from the strategies tab as well - just keep in mind they use the default chart lookback in 6.5 so you would want to ensure those 'days back' settings fit what your strategies need.

    For autotrading in general, please take same time and review this closely -

    Comment


      #3
      I am running NT7 exclusively. So it sounds like it will be easier and more automatic for me in that case? I am also looking into "AutoIt" which is a windows scripting package that I may be able to use to startup TWS automatically (even if I launch the script manually and watch it work each day).

      I am familiar with Strategy Positions vs. Account positions from Tradestation.

      Comment


        #4
        Yes, NT7 simplifies the process greatly due to supporting the persistence of strategy instances and their settings.

        Comment


          #5
          Tradetree,,,You don't have to log into TWS every day, once your logged in just change the time in the Configure/ Lock & Exit section , I have mine set to log out at 2:00 pm pst then I simply click on the log off at 2am pst, thne at about 2:30pm pst I just change it back to log off at 2pm pst so I am up & running 24 hours a day 6 / There is also an TWS program out there that will keep you logged on all the time but I have had it crash my system
          I made a fully automated trading system using TWS & Amibroker but it took a long time and does have some problems that I would discuss further if you like

          Comment


            #6
            TWS log off

            You can stay logged on TWS 24/7 if you like by simply going to TWS / Configure / Lock & Exit. just keep changing the time. I have mine set to log off at 2pm pst then at 1:45 pm I just click on log of at 2am then at 2:30 pm I just click on log off at 2pm again .
            There is also a program out there on the net that will keep you logged on 24/7 but I have had this crash my system for TWS.
            I wrote a fully automated trading system that works fairly well but does run into a few problems which I would be willing to discuss further that runs using TWS & IB with Amibroker

            Comment


              #7
              I think you submitted the message a few times! :-) I'll have to install TWS to get to the point where I can look at the menu items you mention. I was worried about more programs causing crashes, the more stuff running the more risk. You wrote, "I made a fully automated trading system using TWS & Amibroker but it took a long time and does have some problems that I would discuss further if you like." Are you referring to the creation of auto-strategies in NT, or in the connection to TWS?

              Comment


                #8
                I installed and looked at the menu options. Isn't changing the time just as much of a pain as logging in? I guess if NT also has to be restarted then it would be that step saved as well. The real problem with restarting NT is that the strategies don't have a global "start all." You have to click on each strategy.

                Comment


                  #9
                  TradeTree,

                  One option is to Control + Click on multiple strategies. You can then enable all by right clicking > enable.
                  Last edited by NinjaTrader_RyanM1; 12-12-2010, 07:51 PM.
                  Ryan M.NinjaTrader Customer Service

                  Comment


                    #10
                    Sounds promising, but it did not work for me. You can select multiple lines of strategies with Ctrl-click, or even Shift-click. The lines selected go "blue". Then if you are still holding Ctrl you can't enable as it ignores the click. If you let go of Ctrl and click on the enable of one of the selected strategies only that one strategy gets enabled. Have you seen this work otherwise?

                    Comment


                      #11
                      I got it to work by keeping the Ctrl key pressed and then right clicking to bring up the menu, and selecting Enable from the menu. Great job, this is a tremendous help!!

                      I also solved my IB timed logout problem by creating a script that automatically changes the configuration at preset times of the day...

                      Comment


                        #12
                        Glad to hear. Thanks for the reply and clarifying this is done through the right click menu.
                        Ryan M.NinjaTrader Customer Service

                        Comment


                          #13
                          tradetree,

                          Could you share the script? Is it using AutoIT?

                          Thanks

                          Comment


                            #14
                            Sure, AutoIT is a freeware download for windows. It works great. I included my script but I don't know that it will work for you as is. There are mouse positions that may rely on your screen resolution/size. If it doesn't work, you can use the AutoIT macro recorder which records a sequence you want to capture. Then compare my version to what the recorder gives as I have an important change. "AutoItSetOption ( "WinTitleMatchMode", 2 ) and _WinWaitActivate("Trader Workstation","") lines are modified so that all instances of TWS are found by the script.

                            These file extension have to change from "txt" to "au3" and then you just double click on it once AutoIT is installed. It should find an existing TWS and maximize it and perform the config change. It minimizes TWS when its done. It is slow enough to watch.
                            Attached Files
                            Last edited by tradetree; 12-29-2010, 11:40 AM.

                            Comment


                              #15
                              Great. Thank you.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by NullPointStrategies, Today, 05:17 AM
                              0 responses
                              20 views
                              0 likes
                              Last Post NullPointStrategies  
                              Started by argusthome, 03-08-2026, 10:06 AM
                              0 responses
                              120 views
                              0 likes
                              Last Post argusthome  
                              Started by NabilKhattabi, 03-06-2026, 11:18 AM
                              0 responses
                              63 views
                              0 likes
                              Last Post NabilKhattabi  
                              Started by Deep42, 03-06-2026, 12:28 AM
                              0 responses
                              41 views
                              0 likes
                              Last Post Deep42
                              by Deep42
                               
                              Started by TheRealMorford, 03-05-2026, 06:15 PM
                              0 responses
                              45 views
                              0 likes
                              Last Post TheRealMorford  
                              Working...
                              X