Announcement

Collapse
No announcement yet.

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.

    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.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        46 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        126 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        66 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        42 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X