Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy backtests fine, but won't optimize

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

    Strategy backtests fine, but won't optimize

    I have been working hard on a strategy, and just when i thought i had everything set, i discovered that although my strategy works when i run it through the backtester, when i run it through the optimizer, i get no results whatsoever on the summary page (0 trades are displayed), but the trades, even in the optimizer, DO show up in the chart, graphs, executions, trades, periods, and orders tabs.

    I'm honestly not too sure where to start troubleshooting. I'll attach a screenshot incase my description is unclear. I am experiencing this problem both on my laptop and my desktop.

    Any ideas appreciated.

    Thanks!
    Attached Files

    #2
    My initial assumption is that it has something to do with your color inputs.

    In the properties section where you serialize your color inputs you can remove these from the properties section by changing the GridCategory

    Try changing it to something like
    [GridCategory("Color Settings")]

    If this does not resolve the issue could you please attach the script or simplified version that replicates the error so that I may test on my end?

    Located in (MY)Documents\NinjaTrader 7\bin\Custom\Strategy

    Additionally what type of optimization are you running? Default or Genetic?
    LanceNinjaTrader Customer Service

    Comment


      #3
      Thanks, that might solve it actually. I won't have a chance to try for a few hours, but i'll let you know if it works.

      Comment


        #4
        Removing the colors as inputs has allowed me to see results in the summary tab the first time i click on that tab, but it if i go back to it after viewing the graphs, the summary switches back to all zeros. Also, the optimizer only shows 4 results, despite my 'keep best # results' set to 50 (and changing the parameters so i should have more than 4 results). My code is fairly long, and i couldn't simplify it. Can i email you? Or if you have another suggestion, i could try that in the meantime.

        Thanks!

        Comment


          #5
          Hello MrOrange,

          You may double check how you are defining your color input with the sample code from the following thread to ensure everything is set.


          If everything checks out and you are still experiencing the same thing you may export your strategy and send it to support [at] ninjatrader [dot] com. In the body of the email reference this thread.
          JCNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

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