Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy must have at least one parameter to optimize

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

    Strategy must have at least one parameter to optimize

    I getting error when i do the backtesting for optimization :
    Strategy must have at least one parameter to optimize

    What is that mean ??
    and how to resolve it ??
    Attached Files

    #2
    Hello cincai,

    Thank you for your post.

    This message means that the strategy in the Strategy Analyzer needs something to optimize.

    Does the strategy have parameters? Have you set a range for at least one parameter?

    Below is a publicly available link to a training video on optimizing a strategy.
    https://youtu.be/SxbGhhkKtXk.

    Let us know if we may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Yes, I have the parameter, But why one of the boolean have to set optimize, then it only can work ??

      Comment


        #4
        Hello cincai,

        Thank you for your note.

        You would need to set a range for your parameter(s) to optimize when running an Optimization. For example, if you try optimizing the SampleMACrossover strategy without setting a range to optimize for the Fast (10;10;1) parameter and Slow (25;25;1) parameter, you would receive the same error message you are reporting. You would need to set a range for the strategy parameters so that there is a range of values to backtest. For example, changing the Fast parameter to 5;10;1 and the Slow parameter 15;25;1 would allow for successful optimization. See the video below demonstrating this.

        https://brandonh-ninjatrader.tinytak...NV8xNjQ3OTU0Nw

        But why one of the boolean have to set optimize, then it only can work ??

        Are you referring to the 'Optimize data series' checkbox? in the Optimization settings? This checkbox would not have to be checked to run an optimization. Checking the 'Optimize data series' box would allow the Data Series Value property to be available for optimization.

        See this help guide link for more information about running an Optimization in the Strategy Analyzer - https://ninjatrader.com/support/help...a_strategy.htm

        Let us know if we may assist further.
        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          No, it is a boolean parameter that I created.
          For example, boolean variable "condition 1", it mean in my strategy will add this condition into it.

          But, why it have to be set optimize ???
          Why can't just true/false only ??

          Comment


            #6
            Hello cincai,

            Thank you for your note.

            I understand that the strategy you are wanting to optimize has a single bool parameter.

            It is important to first understand the purpose of optimizations before optimizing a strategy. You can fine-tune the input parameters of a strategy through optimization. Optimization is the process of testing a range of values through iterative backtests to determine the optimal input values over the historical test period based on your optimization fitness.

            This bool parameter would need to be set to 'Optimize' because to optimize a strategy you have at least one ranged input. If the bool is set to True or False, there would not be a range of values to optimize with. Setting the bool to Optimize means that the Optimizer would test values for when the bool is both True and False to determine the optimal input values.

            I suggest running a backtest with your strategy to determine how the strategy may perform instead of running an optimization. This would allow you to backtest the strategy with the bool set to True or False.

            Let us know if we may assist further.
            Brandon H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by advketoprice, Today, 03:48 AM
            0 responses
            2 views
            0 likes
            Last Post advketoprice  
            Started by advketoprice, Today, 03:46 AM
            0 responses
            3 views
            0 likes
            Last Post advketoprice  
            Started by elliot5, Today, 03:37 AM
            0 responses
            2 views
            0 likes
            Last Post elliot5
            by elliot5
             
            Started by Papercut110, Today, 03:17 AM
            0 responses
            3 views
            0 likes
            Last Post Papercut110  
            Started by max333, Today, 02:22 AM
            2 responses
            6 views
            0 likes
            Last Post NinjaTrader_Jason  
            Working...
            X