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 sjsj2732, 03-23-2026, 04:31 AM
      0 responses
      110 views
      0 likes
      Last Post sjsj2732  
      Started by NullPointStrategies, 03-13-2026, 05:17 AM
      0 responses
      335 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      352 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      165 views
      1 like
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      126 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Working...
      X