Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

custom optimization criteria for annualizing cummulative profit

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

    custom optimization criteria for annualizing cummulative profit

    Suppose I want to write my custom optimization criteria

    public class MyOptCrit : OptimizationType
    {

    }

    where I need the function to use annualized version of "cummulative profit".

    For instance, suppose I am doing an optimization over the period say 3/1/2010 to 3/1/2016, i.e. a period of 6 years, and the cummulative return returned in the summary tab is 205%, then

    (i) how can I get the cummulative return ? i.e. is there something similar to "systemPerformance.AllTrades.??.??.CummulativeProf it" ?

    (i) how can I make the function get the start and end dates for the data (i.e. 3/1/2010 and 3/1/2016) and convert it into say years (6 years in this case) ? Is there a way something similar to "Strategy.BeginDate" and "Strategy.EndDate" ?



    Thanks

    #2
    Hello uday12,

    Thank you for writing in.

    You will be able to utilize systemPerformance.AllTrades.TradesPerformance.Curr ency.CumProfit to obtain the cumulative profit of the collection: https://ninjatrader.com/support/help...?cumprofit.htm

    Unfortunately, you will not be able to obtain the times specified within the Strategy Analyzer window. Additionally, the GetPerformanceValue() method will return a double value as its return type is double. You'll be unable to return a DateTime object to the Strategy Analyzer's "Performance" column.
    Zachary G.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    558 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X