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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        152 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        87 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        131 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        127 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        106 views
        0 likes
        Last Post CarlTrading  
        Working...
        X