Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Optimizer not optimizing all parameters

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

    Optimizer not optimizing all parameters

    Hi I am trying to optimize a Stragety that I have written, Im not really interested in the stragety being succesful in terms of trading logic, I have just developed a dynamic Lot sizing component that will allow trades a lot size based on a stop loss established at a certain % of the ATR and available balance in the account.

    I have run the optimization, changing the parameters for the PrecentATR to a fairly wide range but the optimizer only seems to be trailing four combinations, and then stopping. It also produces very different results with each attempt at optimizing. This is the same whether I use the genetic or default optimizer.

    What is really odd is that if I do a regular back test, and manual change the PercentATR Parameters in the properties pane, the whole thing works correctly, even when trailing parameters that are well and truly outside the range I set for the optimizer. The results are also consistent in the Backtest but not the optimizer. I have included a screen shot of the report after running the optimzer so you can see it only does four runs, even though there are a 1000 odd combinations possible. I have also included the strategy code so you see there inst anything odd or random in the code.

    Thanks in advance
    Attached Files

    #2
    Thank you for posting this detailed info.

    When I run this strategy I start getting OnBarUpdate errors on the log tab of the Control Center. Can you clarify if you see the same?
    MatthewNinjaTrader Product Management

    Comment


      #3
      Thanks for the reply. I found the error in code. Basically because I was using File.AppendText to write to my own log, I think was cause concurrency issues, I read somewhere that back testing is multi thread, well I guess multiple threads trying to write to same file cause an exception that I didn't handle. I removed that piece if code and everything worked just fine. Thanks anyway though.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by xiinteractive, 04-09-2024, 08:08 AM
      3 responses
      11 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by Johnny Santiago, 10-11-2019, 09:21 AM
      95 responses
      6,193 views
      0 likes
      Last Post xiinteractive  
      Started by Irukandji, Today, 09:34 AM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Started by RubenCazorla, Today, 09:07 AM
      1 response
      6 views
      0 likes
      Last Post RubenCazorla  
      Started by TraderBCL, Today, 04:38 AM
      3 responses
      26 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X