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

Strategy Analyzer: Total Net Profit

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

    Strategy Analyzer: Total Net Profit

    Is there any way to change the value of the "Total Net Profit" that is displayed in the Strategy Analyzer ? That is, I'd like to apply different "expenses" to limit orders vs market orders (sort of like commissions that vary according to what kind of order is executed).

    #2
    Hello spottysallrite,

    There is not a way to modify the standard metrics in the analyzer. You can create a custom performance metric and then enable it in the options menu to display custom results in the results list.

    JesseNinjaTrader Customer Service

    Comment


      #3
      Well, I've thought about that. How would I then also include the Max. drawdown?

      Comment


        #4
        Hello spottysallrite,

        You would have to do the math to calculate that in your custom performance metric or use the TradesPerformance collection that the metric has access to in the merge stage.

        The sample performance metric that comes with the platform is documented and shows how you can access the individual trade values to return a performance value and also how to access the full performance collection to do a final calculation to provide a result to the grid totals.

        JesseNinjaTrader Customer Service

        Comment


          #5
          Right. When doing Optimizations, I often use the Max Downdown as part of my custom OptimizationFitness calc. So, for this metric to be accurate the Drawdown calc would have to include these variable "expenses" that I mentioned in my first post here. So, any suggestions as to how to include these "expenses" in these drawdown calcs so they can be used for ranking purposes in the Optimization?

          Comment


            #6
            Hello spottysallrite,

            You would need to manually do the math in your performance metric based on the available data if all data points you require are available there. You can't change the calculations of the existing performance metrics so anything outside of standard metrics that your fitness requires would require that you do the math yourself.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Well, seems like the best way (only way ?) to apply this custom "expense" is to each, individual trade of each scenario of an Optimization. Yes, that can be done in Excel using exported results from the Strategy Analyzer, but what is needed is for those calcs to be used while the Optimization is run (so as to rank those results).

              Maybe what I'm asking for is a custom field in the "Trades" window that would include this kind of work (eg, variable expenses according to execution type), then include that in a custom performance metric calculation. Would this be possible now, or would that have to be done in a future version of NT, or is this just something that will not be done at all by NT?

              Comment


                #8
                Hello spottysallrite,

                From an optimizer fitness you would need to use the SystemPerformance collection to go over the trades and accumulate your own value so you can do the math you need before setting Value. You have access to all of the trade information in the strategy.SystemPerformance.AllTrades collection.
                JesseNinjaTrader Customer Service

                Comment


                  #9
                  I am a beginner and can you tell me if the setting is good to have a dailywin. THANKS




                  // Ensemble 3
                  if (SystemPerformance.AllTrades.TradesPerformance.Cur rency.CumProfit < Dailywin1)
                  {
                  ExitShort(Convert.ToInt32(DefaultQuantity), "", "");
                  }

                  Comment


                    #10
                    Hello Tim-c,

                    You can find a sample of using the cumulative profit in the strategy builder in the following forum post:

                    Hello, I've updated the DailyLossLimit and DailyLosLimitMultiTrade examples that were posted on the forum for NinjaTrader 7 for NinjaTrader 8. These are often requested and I felt they are good examples to have for NT8. DailyLossLimitExample_NT7 - http://ninjatrader.com/support/forum...241#post451241 (http://ninjatrader
                    JesseNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by fx.practic, 10-15-2013, 12:53 AM
                    5 responses
                    5,404 views
                    0 likes
                    Last Post Bidder
                    by Bidder
                     
                    Started by Shai Samuel, 07-02-2022, 02:46 PM
                    4 responses
                    95 views
                    0 likes
                    Last Post Bidder
                    by Bidder
                     
                    Started by DJ888, Yesterday, 10:57 PM
                    0 responses
                    8 views
                    0 likes
                    Last Post DJ888
                    by DJ888
                     
                    Started by MacDad, 02-25-2024, 11:48 PM
                    7 responses
                    159 views
                    0 likes
                    Last Post loganjarosz123  
                    Started by Belfortbucks, Yesterday, 09:29 PM
                    0 responses
                    8 views
                    0 likes
                    Last Post Belfortbucks  
                    Working...
                    X