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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        80 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