Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OptimizationType ?

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

    OptimizationType ?

    I would like to create some new OptimizationType classes. I was looking at the MinDrawDown class, because I would like to create one that minimizes AvgMae and/or AvgEtd

    When creating/using one of these OptimizationType classes, how does the optimizer know to optimize based on min as opposed to max values that the GetPerformanceValue function returns?

    i.e. how would I code this method so it would get optimization results based on the parameter combinations with the minimum AvgMae

    Code:
     
    [SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]override[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] GetPerformanceValue([/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]SystemPerformance[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] systemPerformance) {[/SIZE]
    [SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] systemPerformance.AllTrades.TradesPerformance.Percent.AvgMae ;[/SIZE]
    [SIZE=2]}[/SIZE]
    Thanks,
    Erik

    #2
    Erik,

    Unfortunately this is beyond the level of support we offer. You could try taking a look at the available optimizers and maybe search around the forums for examples.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      will

      Code:
      return - systemPerformance.AllTrades.TradesPerformance.Percent.AvgMae;
      work?

      Comment


        #4
        ErikHR, unfortunately this out of supported scope as Josh already stated - you would need to give a run and test your custom type then...I believe min and max are designated in the type's name...

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        650 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        370 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        577 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X