• 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


Strategy Analyzer Crashes Every Time

  • Filter
  • Time
  • Show
Clear All
new posts

    Strategy Analyzer Crashes Every Time


    After upgrading to the latest version of NT8 (v., every time I tried to launch the Strategy Analyzer today, NT8 crashed on me.

    So I uninstalled the latest version of NT8 and installed the previous version (v but still, the Strategy Analyzer and NT8 crash on me when I try to launch the Strategy Analyzer.

    This occurred while using the Playback connection on a Friday after the markets were closed.

    The NinjaScript Editor does open without any problem and I am able to open my strategies in a new NinjaScript Editor, but the Strategy Analyzer is not usable on my NT8 installation on my computer at this time.

    Is there any way to resolve this problem?
    Last edited by i2w8am9ii2; 11-02-2018, 05:17 PM. Reason: Additional info regarding connection type

    Update: The problem appears to be with one or two of my new strategies.

    The way I discovered that is I launched the Strategy Analyzer using NT8 on my laptop, which is running the previous version of NT8 (v At first, the Strategy Analyzer loaded up with no problem, I could choose 'optimization' and load a strategy and so on.

    But I noticed that my new strategy was not in the list of strategies to run a back-test on, so I closed the Strategy Analyzer and opened my new strategy in the Editor. Then I compiled the strategy.
    After that, every time I tried to launch the Strategy Analyzer, it crashed.

    So the problem with the Strategy Analyzer crashing on my PC appears to not be with the new version of NT8 (v., it appears to be something with the new strategy I created.


      Update: I've made some progress while using NT8 (v on my laptop.

      First I tried moving all the strategies, except for the default strategies that come with NT8, to a temporary folder on my desktop.

      The Strategy Analyzer still crashed NT8, so I uninstalled NT8 (v and then reinstalled it.

      Then I was able to launch the Strategy Analyzer and not have it crash NT8.

      And the default NT8 strategies would load in the Strategy Analyzer.

      After that, I copied one of my old strategies that have been working back into my NT8 Strategies folder. I had to compile that strategy again before it would show up in my list of strategies.

      Then I copied my problem strategy into the NT8 Strategies folder. Initially it would not show up in my list of strategies in the Strategy Analyzer.

      Then after I went back and forth commenting out code, finally, by the end of the day, my new problem strategy showed up in my list of Strategy Analyzer strategies.

      But then and still now, whenever I try to load that strategy, it causes NT8 to freeze, and I have to crash the program.

      But the thing is, I installed the free trial version of ReSharper and had it inspect all my code several times, and each time it says there are no issues and it gives me a green arrow after checking everything. Screenshot attached.

      So now I'm going back and forth between commenting out code, and then trying to load my strategy into NT8 without having it freeze. No luck yet. But again, it is obviously my new strategy that is the problem.
      Last edited by i2w8am9ii2; 11-04-2018, 01:05 PM. Reason: Screenshot added and one line of additional info added.




          Hello i2w8am9ii2,

          Sounds like a run time error in OnStartUp..

          Are you seeing any errors in the Log tab of the Control Center?

          May we have the .cs file to test this on our end?
          Chelsea B.NinjaTrader Customer Service


            Hi Chelsea,

            Thanks for your reply and offer to take a look at my .cs file.

            The error message that I see repeated in the Log tab is:
            Indicator ".Error on calling 'OnBarUpdate' method on bar 1: You are accessing an index with a value that is invalid since it is out-of-range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.

            Screenshot attached.

            Before that error message, each time it appears to say: Restoring workspace 'Indicator-Tests-02'...

            And there is always a Session Break (Version message in yellow each time also.

            I will email you folks my .cs file, but keep in mind that I commented out code and so on while debugging this file, so it might not be exactly as it was when I got the error messages.

            Another thing is, after copying the partially fixed .cs file from my laptop to my PC, the Strategy Analyzer still would crash on me; so I did the same thing that I did on my laptop, I moved all my strategy files to my desktop, then uninstalled and reinstalled NT8, then moved my strategy files back.

            So my previous error messages might no longer be in the Log tab. Not sure how that works regarding if the Log tab errors are retained after an uninstall.


              Hello i2w8am9ii2,

              As you have emailed in, I will converse with you through email moving forward.

              As a tip, the Strategy Analyzer is not crashing. The script is becoming disabled due to an error being hit in the script. The Strategy Analyzer should remain usable after this occurs, however any backtest will not be completed due to the runtime error in the script causing the script to become disabled.
              Last edited by NinjaTrader_ChelseaB; 11-05-2018, 07:46 AM.
              Chelsea B.NinjaTrader Customer Service


                Hi Chelsea,

                Thanks for your message.

                Okay, I will wait for your email.


                Latest Posts


                Topics Statistics Last Post
                Started by kokobeef, Yesterday, 06:00 PM
                3 responses
                Last Post NinjaTrader_Marco  
                Started by bkinvent, Yesterday, 09:45 PM
                0 responses
                Last Post bkinvent  
                Started by linuxguru, Yesterday, 06:02 PM
                0 responses
                Last Post linuxguru  
                Started by Bionian, Yesterday, 03:07 PM
                1 response
                Last Post NinjaTrader_ChelseaB  
                Started by JakeOfSpades, Yesterday, 03:05 PM
                2 responses
                Last Post JakeOfSpades