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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        67 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        36 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        59 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X