Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to show profit from day to day and not from trade to trade?

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

    How to show profit from day to day and not from trade to trade?

    Is there a way in the strategy analyzer to display cumulative profit from day to day? All I see is profit from trade to trade but I would like to see the unrealized profit chart day to day as it fluctuates when a position is held multiple days. The picture attached shows the blue line which is the regular NT display from trade to trade. The red line is the unrealized profit from day to day as the position stays open multiple days and the draw down is shown.

    Obviously this is not possible to show directly from the strategy analyzer but maybe there is some way to code this to show the real value fluctuations.

    Attached Files

    #2
    Hello bogey20,

    The Strategy Analyzer is only able to include closed trades (realized pnl) with cumulative profit in the Graphs tab. It is not able to include unrealized pnl (open positions).

    Something like this could be tracked via code and output to the output window or to a file if desired.

    The unrealized pnl can be found from the open position using .GetProfitLoss().


    As far as tracking the unrealized pnl for a day, would this exclude any completed trades and print the position's pnl if there is a position open at the end of a session?
    (This would require that 'Exit on close' be set to false so that positions may remain open overnight)


    The Strategy Analyzer is able to show Daily Net Profit in the Graph drop-down in the Graphs tab and on the Periods tab can show Cumulative Profit for each day when Period drop-down is set to Daily, but this is once again for realized pnl and does not include unrealized pnl.

    Though you are not asking about realized pnl for closed trades, below I am providing a link to an example script that stores pnl for closed trades and uses this for a daily loss limit. This pnl is reset on each new session.

    Last edited by NinjaTrader_ChelseaB; 04-02-2017, 12:21 PM.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks Chelsea, this is helpful.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by terofs, Yesterday, 04:18 PM
      1 response
      21 views
      0 likes
      Last Post terofs
      by terofs
       
      Started by CommonWhale, Today, 09:55 AM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by Gerik, Today, 09:40 AM
      2 responses
      7 views
      0 likes
      Last Post Gerik
      by Gerik
       
      Started by RookieTrader, Today, 09:37 AM
      2 responses
      12 views
      0 likes
      Last Post RookieTrader  
      Started by alifarahani, Today, 09:40 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X