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 Rapine Heihei, Today, 08:19 PM
          1 response
          3 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by Rapine Heihei, Today, 08:25 PM
          0 responses
          3 views
          0 likes
          Last Post Rapine Heihei  
          Started by f.saeidi, Today, 08:01 PM
          1 response
          4 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by Rapine Heihei, Today, 07:51 PM
          0 responses
          6 views
          0 likes
          Last Post Rapine Heihei  
          Started by frslvr, 04-11-2024, 07:26 AM
          5 responses
          96 views
          1 like
          Last Post caryc123  
          Working...
          X