Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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...
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bmartz, 03-12-2024, 06:12 AM
        4 responses
        31 views
        0 likes
        Last Post bmartz
        by bmartz
         
        Started by Aviram Y, Today, 05:29 AM
        4 responses
        12 views
        0 likes
        Last Post Aviram Y  
        Started by algospoke, 04-17-2024, 06:40 PM
        3 responses
        28 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by gentlebenthebear, Today, 01:30 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by cls71, Today, 04:45 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X