• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.


No announcement yet.

Partner 728x90


Crash to Desktop on launch - Connecting to IB

  • Filter
  • Time
  • Show
Clear All
new posts

    Crash to Desktop on launch - Connecting to IB

    As the title says... when I launch NT7, the latest stable release (reinstalled it today from the website download), I get the error:
    Unable to connect to database 'Data Source="C:\users\<cleared>\Documents\NinjaTrader 7\db\NinjaTrader.sdf"': ObjectSpace: Connection String is Invalid - Exception has been thrown by the target of an invocation
    While I realize that this would indicate a problem within the SQL Database, the error only started appearing when I set up an account connection to my Interactive Brokers TWS.

    Renaming the NinjaTrader.sdf file within the error creates a new database file, however the error persists.

    That said, the problem does go away if I use the 32 bit variant. Or at least, the error does. It attempts to open and connect to TWS (which is open and configured properly, I have used it successfully for a data connection) however the UI fails to display.
    Last edited by AngryErik; 02-21-2013, 10:31 AM.


    Thank you for your note.

    NinjaTrader requires various Microsoft components to run, one of which is SQL compact Edition. Currently you may not have SQL Compact Edition for 64-bit or possibly have the incorrect version of SQL Compact Edition installed.

    Please follow the below steps to ensure the correct version of SQL Compact Edition is installed on your PC. If you are not entirely comfortable performing the steps below, please let me know and we can setup a time for a remote support session.
    • Navigate to the Windows Control Panel
    • Add and remove software/programs
    • Uninstall any SQL Compact Editions you see, if none are present you may ignore this step and continue onto the next step
    • Install latest SQL Compact Edition 3.5. SP2 which is available here: http://www.ninjatrader.com/support/f...NU_x64_zip.exe
    • Once you run the downloaded file it will ask you for a directory to extract the installer to. Point this to a temporary directory that you will be able to quickly locate later, such as the desktop
    • Navigate to the aforementioned directory in which the files have been extracted to (there will be two files)
    • SSCERuntime_x86-ENU.msi - Run this one first
    • SSCERuntime_x64-ENU.msi - No need to run this if you are on a 32 bit system, if you are on a 64 bit system you will also need to run this file, if you are not sure if you have a 64 bit system go ahead and run this file. If you are not using a 64 Bit operating system, the installer will cancel itself automatically
    • Follow the installation steps outlined in the installation wizard
    • Once installed you will need to restart your PC

    You will now be able to launch NinjaTrader 7

    If you are unable to launch NinjaTrader 7, please let me know and provide me with your phone number so that I may call you to further assist.
    CameronNinjaTrader Customer Service


      Thanks - the CTD is resolved. Sadly, the application itself is still failing to launch (and in fact has prompted some rather paniced edits of my posts hahah).

      The application launches successfully, but then attempts to launch the TWS and punch my credentials in (username, tab, password, enter -- sadly it decided to do that while I was making my initial post hahah). Whether I let it log into TWS or not, the UI doesn't show up.

      I have again uninstalled and reinstalled the application, however it appears to be retaining this connection setting. I'm comfortable with manually editing config files or the registry, if this is stored in a particular place.



        What version of TWS are you using? You can check under TWS -> Help -> About -> Scroll to the Build #

        With the current version of NinjaTrader, 7.0.1000.11, it is critical that you use TWS version 927. Please uninstall your existing version via the Windows Control Panel, and then install 927 via the following link:


        Once TWS 927 has been installed, please ensure that the configuration in our Connection Guide for TWS has been completed.

        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.
        CameronNinjaTrader Customer Service


          No love, I'm afraid. I did have a more recent version of TWS installed, which I downgraded via the link provided.

          Current behavior is as before, I launch NT7, it shows the splash screen as it loads up, then it launches TWS, punches the credentials in, TWS launches, and nothing.

          The TWS settings are as they should be, the NT7 settings are unchangeable, as the NT7 application does not finish loading - splash screen goes away, process sits in the background, but nothing that I can interact with.


            Problem solved... I waited with it open (letting it type the credentials out into notepad after TWS was launched the first time), and eventually it finished loading the NT7 application. I've disabled the connect on startup, and will take it from here.

            Thank you for your time.



              Thank you for the update.

              Please ensure that TWS is not opening to Mosaic view.

              You can see an example of Mosaic view from the following link.

              If you are opening in Mosaic view, go to New Window -> Advanced Order Management (TWS).

              Once TWS window opens up, select File -> Save Settings.

              Additionally, is your TWS title bar different than the example screen shot?
              Attached Files
              CameronNinjaTrader Customer Service



                Thanks for the update, Looks like my reply was just a minute late.

                Let us know if you have any further questions.
                CameronNinjaTrader Customer Service


                  Odd... I previously did not need to have the advanced order management window open. Perhaps a more recent build than 927.7 works with NT7 (I'll continue to use the supported version, of course).

                  I am 100% operational again, with the AOM window open NT7 was able to connect via socket to an open TWS client.


                  Latest Posts


                  Topics Statistics Last Post
                  Started by daya123, Today, 09:16 PM
                  0 responses
                  Last Post daya123
                  by daya123
                  Started by Wingo, Today, 04:52 PM
                  1 response
                  Last Post bltdavid  
                  Started by Bionian, Today, 10:10 AM
                  3 responses
                  Last Post Bionian
                  by Bionian
                  Started by D Trader, Today, 01:41 PM
                  0 responses
                  Last Post D Trader  
                  Started by rexmie888, Today, 04:00 AM
                  1 response
                  Last Post NinjaTrader_ShawnB