Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Code to keep track of the profit/loss of an entry order lively

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

    Code to keep track of the profit/loss of an entry order lively

    Can you provide me with a sample code to keep track of the profit/loss of an entry order lively? I want to keep track of the unrealized profit/loss of an order from its entry to its exit. It then resets to zero after the order is exited.

    #2
    Hello wyifei6688,

    Thank you for your post.

    You can get the unrealized profit/loss of an open strategy position using GetUnrealizedProfitLoss(). The following help guide page has more information and a code snippet showing how it could be used:Please let us know if we may be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    90 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    120 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X