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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        55 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        142 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        160 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        96 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        276 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X