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

Access stats in optimization from different parameter set

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

    Access stats in optimization from different parameter set

    Hello traders,

    If I'd want to get the value for Profit Factor in method OnCalculatePerformanceValue() in an optimization fitness, I'd do it by typing:
    Value = strategy.SystemPerformance.AllTrades.TradesPerform ance.ProfitFactor;

    This value is for current optimization parameters, those assigned by optimizer in current iteration. Say OnCalculatePerformanceValue() is called for parameters Fast = 10, Slow = 50 and I would like to check Profit Factor for a different parameter set, for example Fast = 20, Slow = 50. Is there a way of doing it?

    In other words, can I check in method OnCalculatePerformanceValue() statistics for Fast/Slow = {20, 50} from {10, 50} (or any other combination)?

    This example is maybe an oversimplification and might appear to be useless, but it is not.

    Thank you.

    Pedro.
    Last edited by pintope; 05-09-2017, 10:15 AM.

    #2
    Hello pintope,

    Within the Strategy Analyzer, under the Parameters column, have you looked for the desired combination, ex {20, 50}, and seen the performance value beside it?

    I look forward to you reply.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hello Alan,

      sure, I know Strategy Analyzer very well but I would like to do it programmatically. I would like my fitness function to be able to check not only stats for current point (parameter set) but also others. I don't know whether it's possible, I have a good understanding of NinjaScript but maybe I miss something.

      Thank you.

      Comment


        #4
        Hello pintope,

        This would not be possible to do programmatically however I will submit a feature request on your behalf.

        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Thanks Alan for your help.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by f.saeidi, Today, 12:14 PM
          4 responses
          11 views
          0 likes
          Last Post f.saeidi  
          Started by Russ Moreland, Today, 12:54 PM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by philmg, Today, 12:55 PM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_ChristopherJ  
          Started by TradeForge, 04-19-2024, 02:09 AM
          2 responses
          32 views
          0 likes
          Last Post TradeForge  
          Started by aprilfool, 12-03-2022, 03:01 PM
          3 responses
          329 views
          0 likes
          Last Post NinjaTrader_Adrian  
          Working...
          X