Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM PnL Question

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

    ATM PnL Question

    Hi All,

    I'm trying to access the Realized PnL in a strategy using the SIM101 account.

    The realized PnL shows up in SuperDom but when I try to call it using;

    GetAtmStrategyRealizedProfitLoss(atmStrategyId);

    all I get is "0" in the output window. All the other AtmStrategy info like position, quantity, or price show up fine.

    Does this function work in the SIM101 account? Or am I missing something?

    Thanks in advance.

    #2
    Hello sheimdal,

    Thank you for your post.

    The GetAtmStrategyRealizedProfitLoss() method can pull the PnL of a closed trade by it's AtmStrategyId. For the currently open positions PnL you can use GetAtmStrategyUnrealizedProfitLoss(): http://www.ninjatrader.com/support/h...izedprofit.htm

    Comment


      #3
      Patrick,

      Thanks for the quick reply!

      Yes, I can do those things you mention. However using ninjascipt I want to access the accumulated PnL that is shown in the SuperDOM when there is no open order. I can't figure it out. Everything I try returns 0.

      Comment


        #4
        sheimdal, the script would only know of it's own placed ATM's and would not be able to access for example manually started ATM's generically. For the account's realized Pnl (account which your strategy is running on) in realtime you can directly work with the GetAccountValue -

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        647 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        369 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        108 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        572 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        573 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X