Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Dysfunctional Connection to IB

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

    Dysfunctional Connection to IB

    I have been connecting to IB through TWS for several weeks without a problem in the connection. I am using NT8B9 64 bit and TWS Build 956.0.

    After struggling with simulation, this morning I decided to attempt a live trade to see if that was any easier. I ran SampleMACrossover on DIS and it took a long position at 10:09:55. NinjaTrader crashed (threw up the messagebox that results from an unhandled exception asking to close or debug the program) immediately after the order filled.

    Since then, when I try to connect to IB, the Connections menu indicates (with a yellow dot, instead of green) that I am connected to IB, and allows me to disconnect from IB. But, I do not get any market data or any other indication that I am actually connected to IB.

    I closed the DIS position manually through TWS. I have opened and closed both NT and TWS several times, with no difference in behavior. I do have a good internet connection and I am getting market data from Kinetick.

    I have noticed that TWS downloads itself very often, and it did again the first time I started it this morning. But it was working before the order executed and I don't think it has downloaded itself since then.

    I would appreciate any help you can give me.

    #2
    Hello rmt81,
    Please send me your log and trace files for today so that I may look into what occurred.
    You can do this by going to the Control Center-> Help-> Mail to Platform Support.
    Please reference the following ticket number in the body of the email: 1476877
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Connection Problem Fixed, NT8B9 still crashes on trades

      After spending much of yesterday and several calls to IB trying to resolve the connection issue, I did fix it by uninstalling and reinstalling NT8 and then restarting my computer. The issue was not resolved until I restarted. Unfortunately, I did not restart my computer until I had restarted, so I don’t know whether that was all that was required.
      However, I am still having problems with NT8B9 crashing immediately after trades execute. Following is the signature of one of those crashes:
      Problem signature:
      Problem Event Name: APPCRASH
      Application Name: NinjaTrader.exe
      Application Version: 8.0.0.9
      Application Timestamp: 56c34600
      Fault Module Name: KERNELBASE.dll
      Fault Module Version: 6.1.7601.19135
      Fault Module Timestamp: 56a1c9ac
      Exception Code: 80000003
      Exception Offset: 0000000000033a82
      OS Version: 6.1.7601.2.1.0.256.1
      Locale ID: 1033
      Additional Information 1: d49a
      Additional Information 2: d49aebb8b644a932216dd7614c6794e5
      Additional Information 3: 181d
      Additional Information 4: 181d62f17816e79bb76452ab2f80e1b6
      The crash occoured Immediately following filling this order:
      Time
      Category
      Message
      3/4/2016 10:19:18 AM
      Execution
      Execution='DIS/00011f98.56d989fd.01.01' Instrument='DIS' Account='IB' Exchange=Nyse (New York Stock Exchange) Price=98.69 Quantity=10 Market position=Long Operation=Operation_Add Order='62295042' Time='3/4/2016 10:19 AM'


      In 2 hours, 5 of 26 trades resulted in similar crashes immediately after execution.
      This is not the only crash of NT8. The following crash occurred when trying to add a strategy to a chart. It seems to be related to initializing the strategy, although this is the unmodified @SampleMACrossover, which I used for all the other trades.

      Problem signature:
      Problem Event Name: APPCRASH
      Application Name: NinjaTrader.exe
      Application Version: 8.0.0.9
      Application Timestamp: 56c34600
      Fault Module Name: PresentationNative_v0400.dll
      Fault Module Version: 4.6.1055.0
      Fault Module Timestamp: 563c1c84
      Exception Code: c0000005
      Exception Offset: 00000000000011c4
      OS Version: 6.1.7601.2.1.0.256.1
      Locale ID: 1033
      Additional Information 1: ff41
      Additional Information 2: ff41d032acb4ef0f74fe8e1939e3c852
      Additional Information 3: 0487
      Additional Information 4: 04870ea7767456b2822698168e9e6cea
      Time
      Category
      Message
      3/4/2016 9:16:31 AM
      Default
      Enabling NinjaScript strategy 'Sample MA crossover/68557298' : On starting a real-time strategy - StartBehavior=WaitUntilFlat EntryHandling=All entries EntriesPerDirection=1 StopTargetHandling=By strategy position ErrorHandling=Stop strategy, cancel orders, close positions ExitOnSessionClose=True / triggering 30 seconds before close SetOrderQuantityBy=Default quantity ConnectionLossHandling=Recalculate DisconnectDelaySeconds=10 CancelEntriesOnStrategyDisable=True CancelExitsOnStrategyDisable=False Calculate=On bar close IsUnmanaged=False MaxRestarts=4 in 5 minutes


      Comment


        #4
        IB Connection not working again

        My connection is again disrupted. But a few things are different. This time I was connected to and trading on my IB paper trading account. So, it is the connection to my paper trading account that is disrupted, while the connection to my live account is working fine.

        This time, NT did not crash. I had 3 charts open. Two were being updated, while one (Instr = BA) had not changed for an hour. BA had live data in TWS. I opened a Market Analyzer for the Dow30 and the only instrument without data was BA. I decided to try closing and reopening the connection, but when I reopened I got the "partial connection" described in post #1.

        In this "partial connection", the log receives a message "Interactive Brokers: Primary connection=Connecting, Price feed=Connecting" and the "connection dot" turns yellow.

        In a good connection, this is followed almost immediately by a TWS MessageBox "Accept incoming connection attempt? Yes/No" (this MessageBox flashes by very quickly unless the "Run-time handling pop up handling" check box in NT connection dialog is unchecked). When Yes is clicked, the log receives a message "Interactive Brokers: Primary connection=Connected, Price feed=Connected" almost immediately, a few seconds pass, and the "connection dot" turns green, a chime sounds, and the log receives a message "Time to auto close position=2:56:00 PM, Enabled=True".

        When the connection is corrupted as I have described, the TWS MessageBox does not appear and none of the subsequent events occur. Therefore, the problem in the connection configuration appears to be before the event that triggers TWS to respond with the MessageBox. However, if I close TWS while in this partially connected state, I immediately get an error message from NT8 that it lost connection with IB TWS/GW, so some degree of connection has been made. Again, no data seems to pass through this partial connection.

        It would seem that the problem is specific to the NT8 connection object. But, I have deleted the object, closed NT, reopened it, and created a brand new connection, carefully following the instructions. That has no effect. So, it must be a setting that is saved separately from the actual NT connection object.

        I have restarted, repaired NT8 and restarted, uninstalled/reinstalled NT8B9 and restarted. Today, none of these steps have restored the connection.

        Thanks in advance for any help you can provide.

        Comment


          #5
          Hello rmt81,

          Thank you for the information you have sent me. I have a controlled environment to run NT8 in, and will review this information over the weekend.
          Jessica P.NinjaTrader Customer Service

          Comment


            #6
            Thanks Jessica:

            I don't know whether it is relevant to this or not, but when I went from Build 8 to Build 9 of NT8, I lost my connections to TD AmeriTrade, FXCM, and NinjaTrader. It was not only the connections that I had set up, but also the templates from which to make new connections were also missing.

            Was that supposed to happen, or is it unique to my computer?

            Comment


              #7
              My IB paper trading connection is now working again.

              When I reinstalled NT8B9 yesterday, I switched to the Administrator account of my computer to do the reinstallation, assuming that maybe it was required in order to replace everything. That did not fix the problem.

              I discovered today that NT had been installed into "My Documents" of Administrator but I was running NT from my user account, so the reinstallation had apparently not taken full effect. So, I decided to uninstall/reinstall again, this time from my user account. I also uninstalled/reinstalled TWS 954 to increase the odds of fixing the problem, realizing that effect was confounded with have reinstalled NT. After restarting, both my IB paper trading and live trading connections worked again.

              So, it appears most likely that reinstalling NT (from the same account that I use it in) fixed the problem. However, I would still like to know what caused the problem, because it is quite disruptive.

              Comment


                #8
                Hello rmt81,

                I am still attempting to reproduce your results on my end. Just to clarify, you were originally using TWS 956.0, and ended up using TWS 954 ?
                Jessica P.NinjaTrader Customer Service

                Comment


                  #9
                  Yes, that is correct. TWS seems to have been auto-updating itself. After the first crash, I went through the connection guide again, and because it specified 954, I installed it and have used it since.

                  Comment


                    #10
                    Hello again,

                    As you know, any version other than 954 is unsupported. However, your attempts to use other versions and reporting your results is appreciated.

                    For testing purposes. many users who report issues with TWS, including those using a custom card based authentication scheme, have reported success starting TWS from the desktop, rather than launching it from NinjaTrader, before NinjaTrader starts. Their accounts are configured without usernames or passwords on the NinjaTrader side. If this approach is successful, you will be prompted from the TWS side to accept an incoming connection whenever you attempt to connect from Ninja. I have been able to complete this process with TWS 955.4f .

                    I am unable to test the order process or complete live orders.

                    If you experience any connection issues with 954, or you are able to reproduce what you were experiencing with an unsupported version through a method other than placing orders, that I can reproduce on my end, please let us know.

                    I was unable to find any documentation on a TWS auto-update feature. I would recommend keeping a zip of your C:\Jts folder, so that you can set TWS at version 954 at any point of time. I have not experienced any auto-updates on my system.
                    Jessica P.NinjaTrader Customer Service

                    Comment


                      #11
                      JessicaP:

                      I was not aware that only 954 is supported, but I have used only it since the first time the connection was corrupted. It has since happened twice with version 954, so I don't believe the version was the problem. But, I will keep using 954.

                      I initially installed TWS from IB's link to it instead of NT's. I think there were several options and I must have chosen something like "always run the latest version". It was very annoying because TWS would download a new version of itself on startup much more frequently than seemed reasonable. So, I like staying with a fixed version that is known to be compatible much better and I am glad to know what that version is.

                      I have been routinely starting TWS from the desktop before connecting from NT because I found the other way to be inconsistent (perhaps because of the automatic updating).

                      The connection is currently working again. If it breaks again, I will try a few other things and get back to you.

                      Thanks

                      Comment


                        #12
                        Lost Connections to TDA, FXCM, and NT in NT8B9

                        When I went from Build 8 to Build 9 of NT8, I lost my connections to TD AmeriTrade, FXCM, and NinjaTrader. I lost not only the connections that I had previously set up, but also the templates from which to make new connections.

                        Was that supposed to happen, or is it unique to my computer?

                        Comment


                          #13
                          Hello rmt81,

                          We have not had other users that I am aware of experience this. If you could e-mail us at platformsupport[at]ninjatrader[dot]com, our support staff will be able to help you more directly. We can attempt to recover your data if this is possible, we can diagnose what occurred, and we can help you set up back ups so this does not occur again.

                          Please reference this unique ticket number in the subject and body of your e-mail :

                          1476877
                          Jessica P.NinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by manitshah915, Today, 12:59 PM
                          0 responses
                          2 views
                          0 likes
                          Last Post manitshah915  
                          Started by ursavent, Today, 12:54 PM
                          0 responses
                          2 views
                          0 likes
                          Last Post ursavent  
                          Started by Mizzouman1, Today, 07:35 AM
                          3 responses
                          17 views
                          0 likes
                          Last Post NinjaTrader_Gaby  
                          Started by RubenCazorla, Today, 09:07 AM
                          2 responses
                          13 views
                          0 likes
                          Last Post NinjaTrader_ChelseaB  
                          Started by i019945nj, 12-14-2023, 06:41 AM
                          7 responses
                          82 views
                          0 likes
                          Last Post NinjaTrader_ChelseaB  
                          Working...
                          X