Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

custom optimization criteria based on % of positive periods

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

    custom optimization criteria based on % of positive periods

    Hi,

    (a) I am interested in a custom optimization criteria that uses

    (max net profit in points) * (% of positive days)

    I looked at a number of sample codes available at Documents\NinjaTrader 7\bin\Custom\Type

    and I can get the

    max net profit (in dollars, not in points) as

    systemPerformance.AllTraders.TradersPerformance.Gr ossProfit + systemPerformance.AllTraders.TradersPerformance.Gr ossLoss

    (i) how can I code in "% of positive days" ?
    (ii) also, how can I get the performance in "points" rather than dollars?

    (b) also, is there any place, where I can get a list of all fields available for systemPerformance.* ?

    Thanks

    #2
    Hello uday12,

    Thank you for writing in.

    Please take a look at the @MaxPercentProfitable.cs optimization type.

    This returns the percentage of profitable trades.

    To get results in points rather than currency, you'll want to change the drop down menu at the top of the Strategy Analyzer window to Points.

    systemPerformance is akin to Performance: http://ninjatrader.com/support/helpG...erformance.htm

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Hi Zachary
      Suppose I don't want to get % of profitable trades, but instead I want to aggregate the net profits per day and calculate % of profitable days, how can I do that?
      Thanks

      Comment


        #4
        Hello uday12,

        Thank you for the additional clarification.

        Unfortunately, this would not be possible through optimization types. These are only ran per optimization and will not aggregate results to form one result.

        The return value of an optimization type is shown in the Performance column in the Optimizer tab in the Strategy Analyzer.
        Zachary G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by judysamnt7, 03-13-2023, 09:11 AM
        4 responses
        56 views
        0 likes
        Last Post DynamicTest  
        Started by ScottWalsh, Today, 06:52 PM
        4 responses
        35 views
        0 likes
        Last Post ScottWalsh  
        Started by olisav57, Today, 07:39 PM
        0 responses
        7 views
        0 likes
        Last Post olisav57  
        Started by trilliantrader, Today, 03:01 PM
        2 responses
        19 views
        0 likes
        Last Post helpwanted  
        Started by cre8able, Today, 07:24 PM
        0 responses
        8 views
        0 likes
        Last Post cre8able  
        Working...
        X