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 lightsun47, Today, 03:51 PM
        0 responses
        5 views
        0 likes
        Last Post lightsun47  
        Started by 00nevest, Today, 02:27 PM
        1 response
        8 views
        0 likes
        Last Post 00nevest  
        Started by futtrader, 04-21-2024, 01:50 AM
        4 responses
        45 views
        0 likes
        Last Post futtrader  
        Started by Option Whisperer, Today, 09:55 AM
        1 response
        14 views
        0 likes
        Last Post bltdavid  
        Started by port119, Today, 02:43 PM
        0 responses
        9 views
        0 likes
        Last Post port119
        by port119
         
        Working...
        X