Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Position.GetUnrealizedProfitLoss(PerformanceUnit.Points, Close[0]) No value

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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?

    #2
    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? :
    Code:
    Print(Position.MarketPosition);
    Does it show Flat or is it reporting that you are in a position?

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    44 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    124 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    65 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X