So I am clear here is an example....lets say you are trading 7 contracts and your first trade was -5 ticks and your second was -12 and your third was plus 27. It would be useful to quickly see you are up 10 total ticks per contract as opposed to seeing a total of plus 70 ticks and then dividing yourself. I realize this would be simple to see you are up 10 ticks per contract but during the trading day with multiple entries it can be more cumbersome. Maybe nobody else would find this useful but I would like to not spend the time to crunch those numbers. It is also mentally easier to think about being down 7 ticks per contract for example instead of down 49 total if using 7 contracts. Thanks in advance for any help on this.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
List PnL Per contract
Collapse
X
-
List PnL Per contract
Is there a way to program or use market analyzer to list the profit and loss divided by number of contracts? For example a person trading 7 contracts with three total trades it would be nice to know how many points PER contract a person is up or down during the trading day. Currently you can only list the total and you then have to divide it yourself which is not that hard but it does take time and focus away from trading.
So I am clear here is an example....lets say you are trading 7 contracts and your first trade was -5 ticks and your second was -12 and your third was plus 27. It would be useful to quickly see you are up 10 total ticks per contract as opposed to seeing a total of plus 70 ticks and then dividing yourself. I realize this would be simple to see you are up 10 ticks per contract but during the trading day with multiple entries it can be more cumbersome. Maybe nobody else would find this useful but I would like to not spend the time to crunch those numbers. It is also mentally easier to think about being down 7 ticks per contract for example instead of down 49 total if using 7 contracts. Thanks in advance for any help on this.Tags: None
-
Hello jhowinvest,
Thank you for your post.
You would need to create a custom indicator that would be able to pull the PnL information and then count the number of contracts/positions that you are in.
However, please note that this kind of programming is not supported with NinjaScript.
I will forward this as a feature request to development on your behalf.
let me know if I can be of further assistance.Cal H.NinjaTrader Customer Service
-
Thanks. Can anyone on the forum point me in the right direction for accessing pnl information for an indicator using ninjascript? I can see how to do it for a strategy but not for an indicator. Is there another code snippet or forum post related to this? I have searched but haven't found anything except for a strategy and not an indicator.
Comment
-
You cannot have a PnL unless there have been trade entries and exits. Such do not happen in an indicator, so you cannot have PnL.Originally posted by jhowinvest View PostThanks. Can anyone on the forum point me in the right direction for accessing pnl information for an indicator using ninjascript? I can see how to do it for a strategy but not for an indicator. Is there another code snippet or forum post related to this? I have searched but haven't found anything except for a strategy and not an indicator.
That having been said, you can of course simulate the orders in an indicator. You know the entry price, and you know the exit price. Record them and subtract as necessary.
Comment
-
I ended up using the realized profit and loss example for the market analyzer and created a custom column to accomplish what I needed. I used the same layout as realized profit and then created a private int where I can enter the number of contracts being used to divide the total realized profit by. I just add this custom column to the market analyzer and it is working well.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
58 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
39 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
19 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
21 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
51 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment