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

How to export results of all parameter profiles in the multi-objective optimization ?

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

    How to export results of all parameter profiles in the multi-objective optimization ?

    Hi Ninja traders,

    I am now running a multi-objective optimization on my strategy. The problem I encounter is, the NT 8 Multi-Objective Optimization window only gives the top 10 performance parameter profiles, while I want to export all the parameter profiles( about 10000 tests and profiles). So that I can run more in depth analysis in R.

    There is a SampleStreamWriter add-on to export data generated by an indicator. So, is there a similar add-on to export all the data generated in the multi-objective optimization?

    Thank you guys.

    #2
    Hello wolfcuring,

    I am unaware of an existing addon that does this, however, you could certainly repurpose the indicators example to write data from any NinjaScript type. One area may be a custom optimizer, you could output the parameter type, name, value etc..

    The StreamWriter example is simply displaying a C# concept, so you can really use any C# means of exporting data that interests you.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thank you Jesse,

      Any further clue on how to do this? Like where is the optimization data stored ? I am not a professional programmer. So, I guess it will take me some time to learn.

      Comment


        #4
        Hello wolfcuring,

        I would suggest looking at the included Optimizers in the NinjaScript editor, this is one area which will contain all of the parameters being optimized. Otherwise, there is no place this information is stored, you kind of just have to output it as you go from your strategy as it tests.

        If you use a strategy to output its parameters as it tests you would likely need to keep a single file per test iteration because the optimizer is multi-threaded. If that works for you, the stream writer example would directly apply, you just use that code in your strategy and customize it as needed. The only change would be making a new file name per test to ensure you don't have write-locks happening as it tests.

        An optimizer may be a better approach as you only are interested in the parameters being tested. If you duplicate the default optimizers code in the NinjaScript editor, you could add a Print to it to see how it outputs the parameters to give you an idea of what it's doing. Here is an example added to line 56 of the script right after the return:

        Code:
        if (IsAborted)
          return;
        [B]Print(parameter.Name + " " + parameter.Value);[/B]
        For what you are asking, this will take some programming to both output the data and get it in the format your looking for. I would suggest reviewing the stream writer example we provide for an example of simply writing data from NinjaTrader as a starting point. In addition, using a search engine to search for C# tutorials on writing data will be helpful. We are just using C# here so most C# solutions for common tasks will work in a NinjaScript file.


        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by TraderBCL, Today, 02:37 AM
        0 responses
        1 view
        0 likes
        Last Post TraderBCL  
        Started by mangel2000, Today, 02:23 AM
        0 responses
        4 views
        0 likes
        Last Post mangel2000  
        Started by mangel2000, Today, 01:30 AM
        0 responses
        12 views
        0 likes
        Last Post mangel2000  
        Started by Doxxxx, Today, 01:24 AM
        0 responses
        5 views
        0 likes
        Last Post Doxxxx
        by Doxxxx
         
        Started by ezekilany, Today, 01:10 AM
        0 responses
        4 views
        0 likes
        Last Post ezekilany  
        Working...
        X