Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
P&L for 2nd trade with 2 active
Collapse
X
-
P&L for 2nd trade with 2 active
I am using :Position.GetUnrealizedProfitLoss(PerformanceUnit. Pips, Close[0]) >= Target to determine the P&L when there is 1 trade active and it seems to be performing correctly. There are times when I have 2 trades active and I require the P&L for the 2nd trade only and then there are times that I need the P&L for the two trades combined. Can someone tell me what to use in these two situations?Tags: None
-
Hi galsermil, thanks for posting. The Position object will be the average position. You would need code in your script that will save the entry prices to class level variables so it can be compared to the current price. Take the difference of those two numbers to find your profit/loss of individual trades.
Kind regards,
-ChrisL
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
93 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
138 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
68 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
123 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
73 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment