• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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.
                    http://ninjatrader.com/support/helpG...-us/export.htm


                    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.
                              https://ninjatrader.com/support/help...lyzerTemplates

                              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.
                              https://drive.google.com/file/d/1ovL...w?usp=drivesdk

                              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 P-Sionic, Today, 06:41 AM
                              1 response
                              8 views
                              0 likes
                              Last Post NinjaTrader_PatrickG  
                              Started by DannyB85, Yesterday, 02:30 PM
                              1 response
                              10 views
                              0 likes
                              Last Post NinjaTrader_PaulH  
                              Started by frankduc, Today, 07:14 AM
                              0 responses
                              2 views
                              0 likes
                              Last Post frankduc  
                              Started by asmmbillah, Yesterday, 06:42 AM
                              1 response
                              12 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by cmarkb, 07-11-2020, 02:15 AM
                              5 responses
                              25 views
                              0 likes
                              Last Post NinjaTrader_Marco  
                              Working...
                              X