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

Only 10% of optimization iterations are shown

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

    Only 10% of optimization iterations are shown

    Hey, I am having a problem:

    I am running optimization test, where I am testing two parameters: EMA Period (From 15 to 30) and SMA Period (From 40 to 60) in order to find best combo for short-to-intermediate trend.

    When I press "Run", it shows 336 for total iterations.

    However, when I export results (Top Left tab in Strategy Analyzer window, that contains multiple results), it only shows 32 rows (where again it should show 336).

    One common suggestion would be to increase "Keep best # results", but it's already 2000.

    Also, I am seeing that with one of recent NinjaTrader updates results that had 0 trades are not shown. So maybe that's an issue, but I doubt it, because I checked in PARAMETERS, so only 15, 16, and 17 are tested for EMA period, and nothing above 17 appear in results.

    So how can I fix it, so when it shows 336 total iterations, it would actually export all 336?

    #2
    however, if I go one-by-one (like 15;15;1 & 40;60;1, then 16;16;1 & 40;60;1, then 17;17;1 & 40;60;1, and so on) - it works well and shows all 21 iterations. But it's so painful to go one-by-one.

    Comment


      #3
      Hello UltraNIX,

      Thanks for your post.

      What NinjaTrader8 version are you using? (Look under help About). If it is not 8.0.24.3, please update to the latest version.

      If you need to update:
      • First, copy your license key from NinjaTrader under Help> License Key then exit NinjaTrader
      • Click on the link: https://ninjatrader.com/PlatformDirect
      • Enter your license key and press Submit
      • Select 'Download'
      • Critical: Before running the installer, ensure NinjaTrader is closed.

      Once updated, please perform the same test with the strategy Sample MA Crossover. Testing here, using ES 09-21, 1 minute bars, with a start date of April 5 2021 through June 17, 2021, I ran the optimizer using 15-30 (fast) and 40-60 (slow) which generated 336 iterations. I was able to see and export all 336 without issue. Please see if you can replicate my results using the same strategy.
      Paul H.NinjaTrader Customer Service

      Comment


        #4
        Yes, that works.

        However, my strategy still doesn't. I changed Optimize On to one of the default optimizers (since I am using my custom Optimize On script, thinking that may cause a problem), but no, still the same results - I see like 21 results, then 320 iterations with 0's (0 trades, 0 profit/loss, etc.). HOWEVER, if I run one by one, it works, but it is very time-consuming. What issue am I encountering here?

        Comment


          #5
          Hello UltraNIX,

          Thanks for your reply.

          When you run your strategy in the optimizer, please check the "Log" tab of the NinjaTrader control center for any error messages.

          Do you see any errors?
          Paul H.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_PaulH View Post
            Hello UltraNIX,

            Thanks for your reply.

            When you run your strategy in the optimizer, please check the "Log" tab of the NinjaTrader control center for any error messages.

            Do you see any errors?
            Re-run my optimization. 0 errors, yet only 35/336 iterations displaying.

            Comment


              #7
              Hello UltraNIX,

              Thanks for your reply.

              We suggest commenting out parts of your code to try to find what section of code is causing the issue.


              Paul H.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_PaulH View Post
                Hello UltraNIX,

                Thanks for your reply.

                We suggest commenting out parts of your code to try to find what section of code is causing the issue.

                That is a tall task, as my code contains of "many" lines.

                Comment


                  #9
                  Figured it out. Error was that I did not instantiate some variables and when I fixed it, it now works as expected.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by GwFutures1988, Today, 02:48 PM
                  0 responses
                  1 view
                  0 likes
                  Last Post GwFutures1988  
                  Started by mmenigma, Today, 02:22 PM
                  1 response
                  3 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by frankthearm, Today, 09:08 AM
                  9 responses
                  35 views
                  0 likes
                  Last Post NinjaTrader_Clayton  
                  Started by NRITV, Today, 01:15 PM
                  2 responses
                  9 views
                  0 likes
                  Last Post NRITV
                  by NRITV
                   
                  Started by maybeimnotrader, Yesterday, 05:46 PM
                  5 responses
                  28 views
                  0 likes
                  Last Post NinjaTrader_ChelseaB  
                  Working...
                  X