• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.
    https://ninjatrader.com/support/help.../alltrades.htm

    Open positions for each instrument will be in the Positions[barsInProgress index] collection.
    https://ninjatrader.com/support/help.../positions.htm

    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.
    https://ninjatrader.com/support/foru...199#post418199
    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 Lisa Marshall, 01-25-2020, 04:11 PM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_Jim  
      Started by utilizator, 01-25-2020, 11:36 AM
      2 responses
      32 views
      0 likes
      Last Post utilizator  
      Started by Aporshnev, Today, 08:46 AM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Tyler  
      Started by fx.practic, Today, 08:54 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by fx.practic, Today, 08:50 AM
      2 responses
      4 views
      0 likes
      Last Post fx.practic  
      Working...
      X