Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How unreleased PnL is calculated?

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

    How unreleased PnL is calculated?

    I print unPnL (via GetProfitLoss) in OnExecution and for the first trade sometimes I get 0 and sometimes non-zero (usually negative value).

    I wonder how it is possible to have a negative OR zero unPnL? I could explain one but not both!

    Thank you.

    #2
    alex.nt,

    It doesn't seem too irregular. You generally will always start out a trade at some loss in futures and fores since Bid/Ask are different values. If you happen to trade stocks its possible to have 0 PnL I believe.

    Please let me know if I may assist further.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Well, the thing is that I have 0 or negative unPnL for ES future (on SIM).

      Yes, Bid/Ask spread explains negative unPnL but it does not explain 0.

      Am I wrong?..

      Comment


        #4
        Hi alex.nt,

        You can have unrealized pnl = 0 when last traded price = entry price.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Well, assuming I am going long, I can get 0 only if Bid = Ask at the moment of trade fill.
          If that is not true then my unPnL is less than zero.

          Am I correct?

          Comment


            #6
            If I'm not wrong I think NT calculate it with Last price, so in the moment of fill you will get 0 because your trade is the Last price.

            Comment


              #7
              With the GetProfitLoss method you actually have the option to choose what you would like to base your PnL calculations on.

              Close,
              Ask,
              Bid

              You can choose when you use GetProfitLoss since you feed in the price for it to calculated the PnL:



              Please let me know if there are any questions.


              -Brett
              BrettNinjaTrader Product Management

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              648 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
              574 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X