Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 thanajo, 05-04-2021, 02:11 AM
          4 responses
          470 views
          0 likes
          Last Post tradingnasdaqprueba  
          Started by aa731, Today, 02:54 AM
          0 responses
          4 views
          0 likes
          Last Post aa731
          by aa731
           
          Started by Christopher_R, Today, 12:29 AM
          0 responses
          10 views
          0 likes
          Last Post Christopher_R  
          Started by sidlercom80, 10-28-2023, 08:49 AM
          166 responses
          2,237 views
          0 likes
          Last Post sidlercom80  
          Started by thread, Yesterday, 11:58 PM
          0 responses
          6 views
          0 likes
          Last Post thread
          by thread
           
          Working...
          X