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

No parameters to optimize

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

    No parameters to optimize

    put this in the top of your optimizer under the class declaration and it appears to fix it:

    public new static long GetParametersCombinationsCount(StrategyBase strategyBase)
    {
    return 1000000000;
    }

    #2
    Hello filopearson,

    Welcome to the NinjaTrader forums!

    Currently NinjaTrader 7 is on 7.0.1000.40 and the flagship for NinjaTrader is 8.0.20.

    This forum thread is fairly antiquated.

    Are you having an issue we may assist with?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello filopearson,

      Welcome to the NinjaTrader forums!

      Currently NinjaTrader 7 is on 7.0.1000.40 and the flagship for NinjaTrader is 8.0.20.

      This forum thread is fairly antiquated.

      Are you having an issue we may assist with?
      Agreed. However, I am experiencing the error in NT8. As noted above, it appears to fix it to add what I posted above in the optimizer class.

      Comment


        #4
        Hello filopearson,

        I have moved your inquiry to the NinjaTrader 8 section of the forums.

        The code you have posted is not recommended.

        Please let me know if you would like assistance correcting a script that is generating an error when optimizing.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thanks, Chelsea. Currently I'm running fine. For anyone else who runs into the issue though, the strategy I am working with has more than one hundred parameters. After I widen the max/min range on all of my parameters for the strategy and after selecting a symbol, it sometimes just throws the above error over and over again every time I try to optimize. Sometimes tweaking the parameter ranges will let it get past the error, but on last occurrence, the only way for me to make it go away was to do what I posted above.

          Comment


            #6
            Hello filopearson,

            Should you want to identify the cause of the error instead of using an unsupported workaround that may or may not cause future issues, please let us know.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Did you want me just to attach the class to the thread? It references multiple external assemblies as well as custom classes so it may not compile for you locally.

              Comment


                #8
                this compiles. i pulled out external references. I expect it should still error since none of the service properties are exposed to the optimizer.
                Attached Files

                Comment


                  #9
                  i use this with genetic optimization and customized genetic optimization.

                  Comment


                    #10
                    Hello filopearson,

                    Thank you for letting me know you are wanting to identify the issue.

                    I am not able to compile the .cs file you have provided.

                    To export a NinjaTrader 8 NinjaScript so this can be shared and imported by the recipient do the following:
                    1. Click Tools -> Export -> NinjaScript...
                    2. Click the 'add' link -> check the box(es) for the script(s) and reference(s) you want to include
                    3. Click the 'Export' button
                    4. Enter a unique name for the file in the value for 'File name:'
                    5. Choose a save location -> click Save
                    6. Click OK to clear the export location message
                    By default your exported file will be in the following location:
                    • (My) Documents/NinjaTrader 8/bin/Custom/ExportNinjaScript/<export_file_name.zip>
                    Below is a link to the help guide on Exporting NinjaScripts.



                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      here's a simplified one that causes the error using genetic algorithm unmodified:
                      Attached Files

                      Comment


                        #12
                        Hello filopearson,

                        The .zip you have provided is password protected.

                        May I confirm that you have uploaded the exported NinjaScript file to the forums exactly as this was exported without modifying it?
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          there's a zip containing the zip. the outer zip has an image and a template to put in your strategy templates directory to make it easier to populate the parameters that cause the error. there is no password, I just extracted it without one.

                          Comment


                            #14
                            here's the exported strategy without the template if it's more convenient.
                            Attached Files

                            Comment


                              #15
                              Hello filopearson,

                              You can add a template to an export. It will need to be in a folder named Strategies, within a folder named templates.

                              Below is a link to the help guide.


                              However, if you put this in another .zip file that is password protected I will not be able to open it.
                              Nor can an script be imported that way.

                              I am not experiencing an error when running this script.
                              Below is a link to a video of a test.


                              If you take the exact steps shown in the video are you getting different behavior?

                              Are you using 8.0.20.0? (Help -> About)

                              The script you have provided has a large amount of inputs. This script may not be fully reduced, and it may be possible to reduce further to find the input causing the error.
                              Have you removed all inputs that can be removed but still reproduce the error?
                              If you remove the UseTriggers public input, compile, and test optimizing, does the error stop appearing?

                              Chelsea B.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by funk10101, Today, 08:14 AM
                              1 response
                              2 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by trilliantrader, Today, 08:16 AM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Started by bill2023, Yesterday, 08:51 AM
                              3 responses
                              20 views
                              0 likes
                              Last Post bltdavid  
                              Started by yertle, Today, 08:38 AM
                              0 responses
                              4 views
                              0 likes
                              Last Post yertle
                              by yertle
                               
                              Started by Mestor, 03-10-2023, 01:50 AM
                              15 responses
                              379 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Working...
                              X