Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PnL of open trade

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

    PnL of open trade

    How can I go about getting the unrealized PnL of one specific open trade created via a strategy? I assume I'd have to use the trade tag or the Order variable, but I'm not sure of the method to use.

    I've used this before - SystemPerformance.AllTrades[SystemPerformance.AllTrades.Count - 1].ProfitCurrency

    However, this only gets the realized PnL of the most recent trade once it's already closed out.

    Thanks.


    #2
    Hello sjeffblack,

    Thank you for your note.

    You can get the unrealized pnl of an open position in a strategy using Position.GetUnrealizedProfitLoss():



    Please let us know if we may be of further assistance to you.

    Comment


      #3
      Thanks Kate. That seems to get the unrealized PnL for ALL open positions though. What if I have multiple open positions at the same time, and I need to get the unrealized PnL of one particular trade?

      Comment


        #4
        Hi Kate. Please ignore the last question. I have what I need. Thanks.

        Comment

        Latest Posts

        Collapse

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