Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get current session's PNL, current realized & unrealized PNL while using ATM strategy

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

    Get current session's PNL, current realized & unrealized PNL while using ATM strategy

    Hi,

    Please help / guide as to finding the current session PNL along with current realized & unrealized PNL (and PNL at Start of Session) when
    1. A Limit order has been placed and accepted, but not yet fulfilled.
    2. A Limit order has been filled, and
    3. The Limit order has been stopped out. i.e., no longer executing...

    Thank you.

    RK
    Last edited by rasdaka; 11-10-2022, 05:08 AM.

    #2
    Hi, thanks for posting.

    The built in way of getting strategy performance metrics is through the SystemPerformance class. This gives trades since the strategy was started, and you can also filter the real time trades from the historical trades. To separate this out into the session will take more C# logic and the use of the SessionIterator. So a full example will not be feasible for me to make in a reasonable amount of time. You can keep track of working, filled, and canceled orders in the OnOrderUpdate event method.

    Kind regards,
    -ChrisL

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    58 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    133 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    73 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X