Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Analyzer Will Not Load Strategy

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

    Strategy Analyzer Will Not Load Strategy

    I was editing and compiling, and then testing a strategy using the Strategy Analyzer, and all was working fine, then when I tried another edit, compile and backtest, but the backtest parameter screen came up with all values completely blank.

    I stopped and restarted NinjaTrader (6.0.1000.5), no change.

    I reinstalled NinjaTrader with "repair" option, no change.

    I removed the NinjaTrader.mdb file and restarted NinjaTrader, and it created a new .mbd file, but still no change with the way the Strategy Analyzer treated just this one strategy.

    I removed the NinjaTrader.Custom.dll and NinjaTrader.Custom.xml files and restarted NinjaTrader, but no change.

    I did a save-as to rename my strategy, recompiled the strategy with the new name, and then tried to backtest it, and still I cannot select either the strategy. When I try to select either of the two strategies (original or renamed one), the parameters stay the same as whatever default strategy was originally displayed when the Strategy Analyzer was first started.

    I can select any other strategy, and the parameter selection screen will change, except for the two that I'm having trouble with.

    Any ideas?

    Best regards,

    KBJ

    #2
    What are the logs saying?

    Comment


      #3
      Strategy Analyzer Will Not Load Strategy

      I didn't think to check the log. Good tip.

      The log says "Failed to call method 'Initialize' for strategy <name>. Object reference not set to an instance of an object."

      I checked and found a reference to "TickSize" which I'm guessing is only defined in the OnBarUpdate() method, so it shouldn't have been in the Initialize() method.

      Removing that, the problem is solved.

      Thanks.

      KBJ

      Comment


        #4
        TickSize causes &quot;Failed to call Method Initialize&quot; msg &amp; crashes strategy and NT

        After using TICKSIZE in the INITIALIZE method I got the error message " Failed to call method 'Initialize' for strategy" and NT failed (when applying the strategy to a chart). Of course, I had changed 100 lines of code and got no compile error or any other error message to indicate that was the problem.

        Without this POST I woud have been scratching my head for hours. Thank you KBJ and the Ninja Trader Support Forum.

        If TICKSIZE can't be used in INITIALlZE why not at least document that fact in the manual? Better yet issue a diagnostic message in the log.

        Comment


          #5
          >> Better yet issue a diagnostic message in the log.
          Will be changed with next update. Thanks for your suggestion.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          51 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          142 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          160 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          96 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          275 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X