Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IB crashed, how to recover the data for NT for my running strategies?

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

    IB crashed, how to recover the data for NT for my running strategies?

    Hello,
    I have "recalculate" as a setting for my strategies.

    IB crashed and I got the "disconnected" error from NT.

    All my strategies show in grey with "enabled" still ticked.

    I launched IB and connected NT, however the strategies do not show the actual price and realized/unrealized PnL.

    What should I do in such a case? I run an automated strategy on 30+ companies.

    #2
    Hello nikolaalx,

    What color is the Strategy cell inside of the Strategies tab of NinjaTrader?

    Do the no prices in the Realize / Unrealized on values that do not quite match up?

    Happy to be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      Most of the strategies are green.

      Prices are frozen...and do not show the actual ones.

      I have disabled/enabled some of the strategies and it appears they do not take into account the previous orders. Once I disable/enable a strategy it loads it becomes highlighted in yellow.

      Comment


        #4
        Hello nikolaalx,

        Sounds like there is no live data coming in from IB.

        You can verify that you are using the current NinjaTrader and IB since the update. You may check what version of NinjaTrader are you using under Help -> About.

        You can verify what version of Interactive Broker's TWS are you using under TWS -> Help -> About -> Scroll down to the bottom and look for the Build #

        If you are using both supported versions can you restart you computer and try this again.

        If not using the supported version of TWS, you may download Traders Workstation 944.3 from the link below.


        To upgrade NinjaTrader you may use this link: http://www.ninjatrader.com/download-registration.php

        Please note that if you have to update any programs shutdown both NinjaTrader and TWS when doing so.


        Let me know if the issue persists.
        JCNinjaTrader Customer Service

        Comment


          #5
          I have latest versions of IB and NT.

          When I relaunched IB, all open charts start to show real-time data.

          The strategies appear to be active, but prices are frozen.

          This is really invonvenient as I have a bunch of open positions and no way to manage the.

          As I said, when I disable/enable a strategy manually, it starts to work. Problem is it starts from scratch and leaves opened position "orphaned".

          Comment


            #6
            Hello nikolaalx,

            Thanks for your clarification.

            When a strategy is reloaded (including disconnecting and reconnecting to a data provider) NinjaTrader is going to recalculate the strategy based on Historical Data, which can throw off your Unrealized / Realized PnL if the execution prices are slightly different from IB's actual prices that your orders where filled at. It should be fairly close.

            As for your positions depending on how your strategy is programmed we can try to change some settings in NinjaTrader to be able to help with this. When you see a Strategy that is Yellow inside of the Strategies tab, this means that your Strategy Historically thinks that it is in a position, but your current settings for NinjaTrader is to "Wait until flat before executing live". This is to help keep your strategy in sync with your account.

            If you see that all of your Strategy that you have an open position are Yellow you may want to try to go to the "Tools -> Options -> Strategies tab -> NinjaScript tab" and change this option to "Immediately submit live working historical orders". This will keep your strategies green and if an Exit order is submitted NinjaTrader will submit this to exit your position. Note that you will just want to make sure that your Strategy Position matches your Account Position when enabling your strategies.



            We actually have a video demonstration that goes over all of this and the different options that you may on our YouTube channel at the link below.


            Let me know if you have any questions.
            JCNinjaTrader Customer Service

            Comment


              #7
              As already mentioned, the problem is all strategies are green, and they are frozen.

              At the same time, open charts are showing real-time prices (not frozen).

              Out of 30 strategies, I had only one that went yellow. And it was frozen as well fyi.

              Only way to get a strategy working again is to disable/enable it manually. When I do so it does not show up in yellow. It shows in green and orphans the open order.

              1. How can I make sure orders are recogized and not orphaned?
              2. How can I solve the bug with the freezing after reconnecting?
              Last edited by nikolaalx; 05-01-2014, 11:22 AM.

              Comment


                #8
                Hello nikolaalx,

                Please send me a screenshot of the Price that are frozen that you are seeing.
                JCNinjaTrader Customer Service

                Comment


                  #9
                  I can't because I rebooted my computer (as per your instructions).

                  Now all strategies have been automatically disconnected.

                  I tested to enable one strategy, but it made a new entry (as it has not recognized the already open position). The enabled strategy was highlighted in green.

                  This is why I don't feel comfortable enabling all strategies...this will duplicate the already existing positions.

                  Comment


                    #10
                    I was able to replicate the problem.

                    I ended the javaw task from my task manager ...basically simulating IB crash.

                    Then I relaunched the IB and connected the interrupted NT to IB.

                    All open charts were automatically updated and realtime prices showing up.

                    The one active strategy that I had prior to the crash also showed up as "enabled" however the price is frozen and it clearly is not working.

                    I have opened up an aapl chart in order for you to see the price that is the real one and the price shown by the strategy.
                    Attached Files

                    Comment


                      #11
                      Hello nikolaalx,

                      Then could you clarify more about what you mean by:

                      When I relaunched IB, all open charts start to show real-time data.
                      The strategies appear to be active, but prices are frozen.
                      So you are getting real-time prices for your instruments? Just to verify if you open up a Time and Sales window (Control Center -> File -> New -> Time and Sales) right click inside of this window and add an instrument that you are looking at.

                      If is the case so then are the Prices that you are referring to the "Avg, Price", "Unrealized", or "Realized" column?

                      As for your strategy submitting orders for a position that already exists, this means that your strategy is processing differently than in real-time.

                      Is this an automated strategy that you have created or one that you have downloaded from a 3rd Party?
                      JCNinjaTrader Customer Service

                      Comment


                        #12
                        I opened time and sales and data is showing just fine. I am also double checking the price data from IB and it is correct.

                        I am trying to explain that upon connection problem, when I reconnect, opened charts resume working just fine and strategies do not. They report to be (show in green and ticked "enabled") however prices are not moving. They are frozen. Unrealized price data is frozen which is how I can tell they are not working. When the strategies are active, the unrealized fluctuates as the price of the isntrument changes.
                        I created the strategy with the wizard (code locked)
                        I also tested with other strategies and the problem is the same.

                        Furthermore when I right click on the presumably enabled strategy, and I check the real-time performance, the chart is frozen and no trades are occuring.

                        Comment


                          #13
                          Hello nikolaalx,

                          Can you send me your log and trace files to your response, so I may investigate this matter further.

                          You may send them to "Support [at] NinjaTrader [dot] com" with "ATTN: JC" in the subject line and reference to this thread in the body.

                          You will find the log file on your PC in the (My) Documents > NinjaTrader 7 > Log folder.
                          The log file will be named "log.YYYYMMDD.txt"

                          You will find the trace file on your PC in the (My) Documents > NinjaTrader 7 > Trace folder.
                          The trace file will be named "trace.YYYYMMDD.txt"

                          Happy to be able to look into this further.
                          JCNinjaTrader Customer Service

                          Comment


                            #14
                            Hi,
                            I just sent the email.

                            I hope it goes through, as the two attachments are 24MB total in size.

                            If you don't get it within the next 30 mins, please do let me know and I will upload them and send the links.

                            Thanks.

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by argusthome, 03-08-2026, 10:06 AM
                            0 responses
                            71 views
                            0 likes
                            Last Post argusthome  
                            Started by NabilKhattabi, 03-06-2026, 11:18 AM
                            0 responses
                            42 views
                            0 likes
                            Last Post NabilKhattabi  
                            Started by Deep42, 03-06-2026, 12:28 AM
                            0 responses
                            25 views
                            0 likes
                            Last Post Deep42
                            by Deep42
                             
                            Started by TheRealMorford, 03-05-2026, 06:15 PM
                            0 responses
                            28 views
                            0 likes
                            Last Post TheRealMorford  
                            Started by Mindset, 02-28-2026, 06:16 AM
                            0 responses
                            56 views
                            0 likes
                            Last Post Mindset
                            by Mindset
                             
                            Working...
                            X