Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TradesCollection

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

    TradesCollection

    Hi,

    I am trying to get performance data for a subset of the trades. I know I can get this for a single trade by

    Trade singleTrade = Performance.AllTrades[Performance.AllTrades.Count - 1]

    and all trades by

    Trade trades = Performance.AllTrades

    but I am having difficulty getting a subset.

    Ideally, by using the perfomance data, the calculations for the metrics (i.e. max consecutive winners, etc) will be calculated automatically and I won't have to write all that code.

    This seems like it should be simple but apparently it isn't.

    Best Regards,
    Scott

    #2
    Hi Scott, you're unfortunately right it needs a bit custom coding here - the only thing you could get would be the trades that makeup a specific position / entry signal with the GetTrades() method - http://www.ninjatrader.com/support/h.../gettrades.htm

    Since you can check for instances back for the reporting here that might give you a lead to what you seek.

    Comment


      #3
      Bertrand, thanks so much. I am also working with a few ideas here; if I find anything that won't lead to more problems, I will post it for others who may have the same issue.

      Best Regards,
      Scott

      Comment


        #4
        Much appreciated Scott.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        671 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        379 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        582 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X