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 NullPointStrategies, Today, 05:17 AM
|
0 responses
50 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
126 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
69 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment