Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plotting Net Profit in Multi Instrument Strategy?

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

    Plotting Net Profit in Multi Instrument Strategy?

    Hello,

    I have a multi-Instrument strategy (up to 26 bars objects) and would like to plot overall net profit for all instruments simultaneously. However the existing net profit calculation appears to be based on the primary bars object or instrument rather than the profit of all instruments together.

    I would like to create a plot of net profit for all instruments together. I would also like to keep a running tab of how many open positions there are in this multi instrument strategy. Any idea on how to do this? Thank you in advance.


    Mr Lee

    #2
    Hello Mr Lee,

    All trades for all instruments will be collected in the Performance.AllTrades collection.

    Below is a publicly available link to the help guide on the Performance collection.


    Open positions for each instrument will be in the Positions[barsInProgress index] collection.


    You can loop through these and add the performances up in any way you would like in your logic.

    Below is a link to an example that uses the Performance collection and does calculations.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you ChelseaB. I'll take a look.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      224 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      143 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      157 views
      1 like
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      237 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      196 views
      0 likes
      Last Post CarlTrading  
      Working...
      X