Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

problems on connecting NT7 with IB

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

    problems on connecting NT7 with IB

    hi there, i got some problems with NINJA7,

    i installed lastest version of NT7, and TWS version 917,

    then following exactly the instruction as below link shows,



    then NT7 just keep on "connecting", but never connected, and NT7 close then re-login TWS over and over again.......

    anyone can help??? pls

    AD

    #2
    Hi adam081527,

    Thanks for posting.

    First, please double-check your TWS version as it's possible an automatic update took place. (we typically see this issue with TWS build 918 and later.)

    Assuming that you are still using the 917.8 build of TWS, please open the 'Configure' menu within TWS and check the API settings - is the 'Direct X and Socket Clients' box checked?
    KyleNinjaTrader Customer Service

    Comment


      #3
      hi Kyle,

      thanks for fast reply,

      yes, the 'Direct X and Socket Clients' box did get checked

      Comment


        #4
        Hi adam081527,

        Please:
        • Please go to the Tools menu--> select Account Connections--> highlight the connection--> click Remove
        • Restart NinjaTrader
        • Please go to the Tools menu--> select Account Connections and recreate the account connection.





        The following link will take you to a page that details the steps required for creating a connection to Interactive Brokers and specific connection configuration information.
        Click here to take me to the Interactive Brokers Connection Guide




        After recreating the connection, are you encountering the same issue?
        KyleNinjaTrader Customer Service

        Comment


          #5
          yes, still the same issue

          Comment


            #6
            Hi adam081527,

            Please uninstall TWS via the Windows Control Panel. Next, install the 917.8 build via this link: http://www.ninjatrader.com/ninjatrad...tall_917_8.exe
            KyleNinjaTrader Customer Service

            Comment


              #7
              i already done this twice, uninstall TWS then reinstall.................as well as NT7

              Comment


                #8
                adam081527,

                Please send a note to Support [AT] NinjaTrader [DOT] com.

                In that note, include a link to this forum thread as well as the username and password for the account so that I may attempt to connect here.
                KyleNinjaTrader Customer Service

                Comment


                  #9
                  hi Kely,

                  much appreciate for your help,
                  im checking with IB to see if there are any problems on my account 1st

                  Comment


                    #10
                    *TEMP FIX* to enable NT connect to TWS 918 and above (including current 920.4)

                    I've had this problem for ages, since I'm using virtual desktops in Windows, where the TWS is running in one virtual desktop and NinjaTrader in another. Because of this, NT cannot instantly find the running TWS window, until I actually switch from NT desktop to TWS desktop and then back again - then it detects the TWS window and connects successfully. Now, since NT cannot detect the TWS window from versions 918 and above at all, anymore, I felt compelled to dig into this issue since I wanted to run latest TWS version along with NinjaTrader.

                    And I have a simple, logical and working solution.

                    Solution in short
                    You have to be able to create your own temporary window, with a title containing "Trader Workstation". In example, "<accountnumber> Trader Workstation", which works for sure - or just "Trader Workstation" should also do it, I guess. Then, when you connect NinjaTrader to TWS, it'll detect that window and based on it, it'll decide that TWS is running - after this it'll begin to connect to TWS API and it's all good again. So it's not the connection API issue or that NT cannot make the connection - it just won't even attempt to, because it cannot detect the TWS window properly.

                    Whatever little program you use to create the "spoof window" doesn't really matter, but my guess is it might not work when the window creator is a process other than javaw.exe (on Windows), eg the Java Runtime process. So it has to be that process at least.



                    And so I created my own tiny Java utility that pops up the window (also allows you to change the title of the window and set it always on top if so desired - just for practical fun). I simply run the utility (can be automated to run with the NinjaTrader.exe) before I make NinjaTrader to connect to TWS... and voila - no looped login attempts, no stucking around anymore. Tested and working with the latest TWS 920.4 version as well.



                    Background of the whole NinjaTrader TWS adapter problem
                    The current NinjaTrader cannot connect to TWS 918 and above, because as of that version, simply the title of the TWS main window, which is displayed when TWS is run, was CHANGED. It used to be "... Trader Workstation", now it's just "...IB TWS" or smth.

                    So NinjaTrader, before it actually connects to the TWS API, attempts to be "smart" and detect if the TWS running instance exists by looking for a window with the title "...Trader Workstation", basically. If it doesn't find it, then you're out of luck - it won't try to connect to the API like it actually should, but instead it pops up a new instance of TWS, with the TWS login window.


                    Simple solution to what NT actually SHOULD
                    do
                    after user tells it to connect to TWS, is
                    1. check for a running TWS window instance (best if the title that is looked for, could be changed by the user and stored as a setting, to ensure future compatibility)
                    2. if it can't find the window, try to connect to the socket API anyways
                    3. if it can't connect to the API either (connection refuses), then and only then start a new TWS instance that pops up the login window.

                    That makes sense, doesn't it? For some reason, it did not for the developers. Well - let it be a suggestion for future improvement.

                    So, as long as the NT devs have not taken the time to fix this annoying issue with the TWS window detection / API connection, I'm using my workaround utility to fix this issue.

                    Pardon, if I take the liberty to post a download link to the utility. If it's not allowed, mods are free to remove it:

                    http://rsx.ee/ninjatrader/NT_IBTWS_Spoof.zip

                    (README.TXT contains some background and usage instructions)


                    P.S. The text inside the utility window aims for no offense towards the NinjaTrader team - but let's admit it, the current TWS adapter connection logic is indeed stupid rather than "smart and useful"

                    Comment


                      #11
                      Thank you very much.
                      Without your spoof window, I would have stopped evaluating this platform.
                      NT should pay you for that information and posting this program here.

                      In my opinion their developers are making other choices in detriment of reliability and quality in general. For example, I doubt they tested their platform when the primary user is not an admin - which should be the default scenario.

                      Comment


                        #12
                        Originally posted by RistoX View Post
                        I'm using virtual desktops in Windows,
                        Thanks you RistoX, all excellently work. I start TWS 920.4 and NT 7.0.1000.7
                        Last edited by Aleks; 11-03-2011, 01:38 AM.

                        Comment


                          #13
                          Yeah... God Bless hackers

                          Thanks!
                          G

                          Comment


                            #14
                            Here's an easy way I use to connect to IB TWS and IB Gateway. Open TWS go to configure API and add 127.0.0.2 to Trusted IP Address then press ok.

                            Next start NT7. Go to Tools Account Connections and add a new IB Connection. At the Host that has a default value of 127.0.0.1 change it to 127.0.0.2 and complete the setup. Use this one to connect to IB TWS.

                            You can test this connection without changing your current Version 917 by using the web based TWS at IB's website (the left side of the webpage).

                            Here's the link http://individuals.interactivebroker...&ib_entity=llc.

                            This also works for IB Gateway and note the default port is 4001.

                            Comment


                              #15
                              RistoX and Flyguy thanks for providing valuable information. Both works, I am currently using flyguy method, which works flawlessly I am using Trader Workstation Build 920 . Thanks.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by rocketman7, Today, 09:41 AM
                              4 responses
                              15 views
                              0 likes
                              Last Post rocketman7  
                              Started by selu72, Today, 02:01 PM
                              1 response
                              9 views
                              0 likes
                              Last Post NinjaTrader_Zachary  
                              Started by WHICKED, Today, 02:02 PM
                              2 responses
                              13 views
                              0 likes
                              Last Post WHICKED
                              by WHICKED
                               
                              Started by f.saeidi, Today, 12:14 PM
                              8 responses
                              21 views
                              0 likes
                              Last Post f.saeidi  
                              Started by Mikey_, 03-23-2024, 05:59 PM
                              3 responses
                              56 views
                              0 likes
                              Last Post Sam2515
                              by Sam2515
                               
                              Working...
                              X