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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    79 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X