Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Extracting Optimized Parameters

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

    Extracting Optimized Parameters

    Good morning.

    I'm working with the optimizer! Its awesome!

    Is there an easy way to see a list of Optimized parameters and their optimized values? The only place I can see these is in the Parameters column, but I cannot make out which is which. E.g. "9,true,true, 21,55,EMA,SMA, true,89"

    or in the settings list on the strategy analyzer (see attached screenshot), which doesn't show boolean or Enum optimzied values, only numbers.

    I'm sure I'm probably missing something...
    Attached Files

    #2
    Hello kevinenergy.
    Thanks for your post.

    How is the public property set up for the parameter you want to optimize?

    The following link has an example of an enum that can be optimized.
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      If anyone else finds the optimized parameters ridiculously difficult to obtain from the Optimizer output, I wrote the following VBA Macro For excel to Transform the output

      Ninjatrader's optimizer returns the optimized parameters in the following format:

      "TMA/7/DEMA/18/SMA/3 (Fast Type, Fast Period, Slow Type, Slow Period, Hilo Type, Hilo Period)"

      Not at all helpful as you need to count the position of each value between the two lists in the output to work out which parameter is which.

      The Macro below converts the exported excel data to this format which is MUCH easier to read!

      "Fast Type(TMA) | Fast Period(7) | Slow Type(DEMA) | Slow Period(18) | Hilo Type(SMA) | Hilo Period(3)"



      Code:
      Public Function NinjaStringMap(data As String)
          Dim splitted As Variant
          
          splitted = Split(data, "(")
              
          Dim paramValueString As String
          Dim paramTypeString As String
             
          paramValueString = splitted(0)
          paramTypeString = splitted(1)
          
          paramTypeString = Left(paramTypeString, Len(paramTypeString) - 1)
          
          Dim paramValueList As Variant
          Dim paramTypeList As Variant
          
          paramValueList = Split(paramValueString, "/")
          paramTypeList = Split(paramTypeString, ",")
              
          Dim result As String
          
          For i = LBound(paramTypeList) To UBound(paramTypeList)
               result = result & paramTypeList(i) & "(" & paramValueList(i) & ") | "
      
          Next i
          
          NinjaStringMap = result
      
      End Function

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by warreng86, 11-10-2020, 02:04 PM
      7 responses
      1,360 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by Perr0Grande, Today, 08:16 PM
      0 responses
      5 views
      0 likes
      Last Post Perr0Grande  
      Started by elderan, Today, 08:03 PM
      0 responses
      9 views
      0 likes
      Last Post elderan
      by elderan
       
      Started by algospoke, Today, 06:40 PM
      0 responses
      10 views
      0 likes
      Last Post algospoke  
      Started by maybeimnotrader, Today, 05:46 PM
      0 responses
      14 views
      0 likes
      Last Post maybeimnotrader  
      Working...
      X