Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TradesPerformanceValues

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

    TradesPerformanceValues

    Is there a way to pull the "average losing trade, in points" statistic out of this object, or are we limited only to the "average profit" per trade?

    #2
    Hello,

    The AvgProfit will output the adverage of all trades. profit in the case is not only trades that profit but trades that lose money as well. There is no paramter to seperate out only the winning trades vs the losing trades.

    To do this you would need to calculate this on your own by setting up a loop and counting together all the positive PnL's and then averaging them and also counting up all the negative PnL's and then averaging them to get this value.
    BrettNinjaTrader Product Management

    Comment


      #3
      I figured as much.

      Along those lines, the "Trades.ProfitPoints" object - what is a 'profit point', for example, in Gold (GC)?

      A tick is 0.1, and is worth $10. There are obviously 100 of these in a full "point".

      Which number are we referring to?

      Comment


        #4
        Hello,

        In this case this would hold .1 is you had a trade that made 1 tick on the GC. You would then multiply this time the QTY of the trade to get the Points made on the trade.

        Let me know if I can be of further assistance.
        BrettNinjaTrader Product Management

        Comment


          #5
          Originally posted by NinjaTrader_Brett View Post
          Hello,

          The AvgProfit will output the adverage of all trades. profit in the case is not only trades that profit but trades that lose money as well. There is no paramter to seperate out only the winning trades vs the losing trades.

          To do this you would need to calculate this on your own by setting up a loop and counting together all the positive PnL's and then averaging them and also counting up all the negative PnL's and then averaging them to get this value.
          Actually, to anybody interested, it's simpler than that:

          First, access:
          Code:
          Performance.AllTrades.LosingTrades.TradesPerformance.Currency.CumProfit
          Then, get:
          Code:
          Performance.AllTrades.LosingTrades.TradesPerformance.TotalQuantity
          Divide the two, you can call this anytime you'd like.

          Comment


            #6
            Hello,

            Yep, nice find. Theres always more then 1 way to do something in progamming
            BrettNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            598 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            343 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            556 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            555 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X