Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Analyzer: Optimization

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

    Strategy Analyzer: Optimization

    Would it be possible to optimize on the ratio of "Total net profit" divided by "Max drawdown" (ie, to maximize this difference)? Yes, you can optimize on either one, but often the optimization of the drawdown (ie, minimizing it) is to make no trades at all, which is not helpful.

    #2
    Hello spottysallrite,

    Thank you for your post.

    Yes, you could create your own Optimization fitness. The following would divide the total net profit in currency by the Max drawdown:

    Value = (strategy.SystemPerformance.AllTrades.TradesPerfor mance.NetProfit / strategy.SystemPerformance.AllTrades.TradesPerform ance.Currency.Drawdown);

    Please let us know if we may be of further assistance to you.

    Comment


      #3
      I'm not following. Where does that code go? Someplace in my script? If so, how does the Strategy Analyzer access it so it can run optimizations on it?

      Comment


        #4
        Hello spottysallrite,

        Thank you for your reply.

        You would need to create an Optimization Fitness script. Once you've created that, you just need to put that line in the OnCalculatePerformanceValue() method and compile - it will then be selectable in the "Optimize On" field in the Strategy Analyzer to use with whatever strategy you like. You can take a look at any of the optimization fitnesses that come built into the platform to see how they are structured - they're pretty simple.

        Please let us know if we may be of further assistance to you.

        Comment


          #5
          Nice ! This seems to be working just as expected / wanted. Any idea when this feature was first offered?

          Comment


            #6
            Hello spottysallrite,

            Thank you for your reply.

            As far as I know, the ability to make your own optimization fitnesses has been available since NinjaTrader 8 came out, so it's been quite some time!

            Please let us know if we may be of further assistance to you.

            Comment


              #7
              Would it be possible to see these results in a field in the "Results" section ? And sort the results according to this parameter?

              Comment


                #8
                Hello spottysallrite,

                Thank you for your reply.

                The optimization fitness metric is shown in the "Performance" column in the Results summary grid, and you can sort by that.

                Please let us know if we may be of further assistance to you.

                Comment


                  #9
                  Is it possible to display more than one performance metric in the "Results" section ? eg, I'm interested in seeing (and perhaps optimizing on) "Max drawdown" / "Total # of trades".

                  Comment


                    #10
                    Hello spottysallrite,

                    Thank you for your reply.

                    You could make a separate optimization fitness script to calculate on that, you'd basically just have to reverse the logic I posted above, but you can only use one optimization fitness per optimization, it wouldn't be possible to display 2 of them.

                    Please let us know if we may be of further assistance to you.

                    Comment


                      #11
                      Ok, I'd like to make a feature request for this (ie, displaying more than one custom parameter in the "Results" section). And, would it be possible to allow the user to give them names ("Performance" is ambiguous) ?

                      Comment


                        #12
                        Hello spottysallrite,

                        Thank you for your suggestion.

                        I have created a feature request on your behalf for this functionality. This request is being tracked under the number SFT-5520.

                        As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted in the Release Notes page of the Help Guide.

                        Release Notes — https://ninjatrader.com/support/help...ease_notes.htm

                        Please let us know if we may be of further assistance to you.

                        Comment


                          #13
                          Add my vote as well.

                          Comment


                            #14
                            Hello UltraNIX,

                            Thank you for your reply.

                            I've recorded your vote for SFT-5520 as well.

                            Please let us know if we may be of further assistance to you.

                            Comment

                            Latest Posts

                            Collapse

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