Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Position.GetUnrealizedProfitLoss(PerformanceUnit.Points, Close[0]) No value
Collapse
X
-
Position.GetUnrealizedProfitLoss(PerformanceUnit.Points, Close[0]) No value
Position.GetUnrealizedProfitLoss(PerformanceUnit.P oints, Close[0]) gives no value in the strategy and remains at zero. The strategy is set for OnBarClose and the value remains at zero during the trade, confirmed using the draw function to print the value on screen. What am I doing wrong here?Tags: None
-
Hello ronaldgreene828,
Thanks for the post.
Could you provide more detail on how you have this used in your logic?
Another way to check this would be to see what the Position is reporting where you used it, have you tried to print the position? :
Does it show Flat or is it reporting that you are in a position?Code:Print(Position.MarketPosition);
I look forward to being of further assistance.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
44 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
124 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
65 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