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.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to show profit from day to day and not from trade to trade?
Collapse
X
-
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.
Tags: None
-
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
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Skifree, Today, 03:41 AM
|
3 responses
12 views
0 likes
|
Last Post
by Skifree
Today, 12:03 PM
|
||
Started by traderqz, Yesterday, 09:06 AM
|
5 responses
32 views
0 likes
|
Last Post Today, 12:03 PM | ||
Started by guillembm, Today, 11:25 AM
|
1 response
6 views
0 likes
|
Last Post Today, 12:01 PM | ||
Started by owensd, 04-21-2024, 11:34 PM
|
9 responses
34 views
0 likes
|
Last Post Today, 11:59 AM | ||
Started by trilliantrader, 04-10-2024, 09:33 PM
|
7 responses
25 views
0 likes
|
Last Post Today, 11:56 AM |
Comment