Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unable to optimize strategy

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

    Unable to optimize strategy

    I had a simple strategy that was working fine. I wanted to add some filters to the strategy, and I also wanted to be able to turn these filters on or off. The first time around I defined several bool type input variables which if = true meant that a particular filter would be active in the strategy (e.g. go long only if EMA is rising, etc.). However I noticed that these true/false input variables seemed not to be optimizable. I wanted to run optimizations that included turning the filters on or off, but this option was not available in the optimization window. Therefore I decided to change these variables to int type so that I would switch between 0 and 1 during optimization. I changed every instance of these input variables to match integer type input variables that had been created by the wizard. But I changed the minimum value to 0 which wasn't the case for the previously created integer-type input variables. But now I still can't vary these inputs during optimization. And furthermore I now get the following message when I try to run an optimization of the other inputs:
    "There are no optimization results available, since the strategy has no parameters to optimize."

    Any idea what's going on?

    Thanks,

    rsi77

    #2
    You'll need to post your code for us to be able to solve the issue. If you don't want to share it, then post snippets at least.

    Also check your Log under the main Control Center tab for any obvious errors.

    Mike

    Comment


      #3
      The problem seems to have solved itself, or perhaps what related to a small change I made to the strategy this morning prior to attempting to optimize it again. When I ran it this morning it worked fine.
      Thanks anyway.
      rsi77

      Comment


        #4
        No Optimization Results Available

        I am having this same problem. I am just trying to run optimization on the SampleMACrossOver strategy.

        Comment


          #5
          Check the log tab for anything obvious.

          If you run out of memory, which will happen if you do a lot of backtesting in the same session, ninja will eventually run out of memory. It may or may not alert you of this with a pop up, but it will be in the log.

          Restart ninja.

          Mike

          Comment


            #6
            Thanks, I looked, but no relevant information. This is a fresh install of NT, so I'm kindof at a loss. Brand new computer, 4G of mem, shouldnt be related to my hardware.

            Comment


              #7
              Running a backtest on identical data (periods, time frame, etc) produces trades?

              If so, it could be one of the optimizations you are trying is killing all the trades off (like a condition that is never met, so no trades taken).

              Try a backtest with a value of "1" or whatever. If it produces results, try a value of "2". If it also produces results, then switch back to optimization mode and have it optimize based on the range of 1 to 2. See what happens, don't test any other values.

              Mike

              Comment


                #8
                Ok,

                Here is the complete error message. "There are no optimization results available, since the strategy has no parameters to optimize" . This message is recieved when trying to optimize. No error message when doing a backtest, but no trades, no matter what I put in for the parameters.

                Using the strategy wizard I created an insanely simple strategy. One parameter.

                If Close[0] > Parameter1 then EnterLong(10,"EnterLong")
                If BarsSinceEntry()>1 then ExitLong("", "EnterLong)

                I set the parameter to 14.0 and tried to backtest against UNG. No trades. Should have entered long for the last 5 days or so. Weird.


                *** UPDATE - I figured out how to get it to work. If I click on the grey square with a "b" in it, it will not work. If i right click on the instrument and select "backtest" it works. Sounds like a software issue to me. Thanks Much for brainstorming with me.


                Of course, the SampleMACrossOver strategy c

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                637 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                366 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                107 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                569 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                571 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X