Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Wrong value of Unrealized PnL in strategies tab

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

    Wrong value of Unrealized PnL in strategies tab

    Hello,

    I created a strategy to take Profit and Stop loss from Unrealized PnL Value.
    In strategy tester, everything works well.
    In the simulated account, when I activated the strategy, it opened a position with a Unrealized PnL that is not correct (in the strategies tab) - It was like ($5000) for 1 ES right away.
    In "account tab" Unrealized PnL is correct.

    Can you please help?

    #2
    Hello markkm,

    Thanks for the post.

    It sounds like the order quantity is incorrect. I would need to test the strategy on my end to see the results that I get. If you don't mind, please export the strategy and send it into platformsupport[at]ninjatrader[dot]com and paste the link to this forum thread in the body of the email. You may also post the strategy here if you like.

    Instructions on exporting can be found below:


    I look forward to assisting further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thanks, I don't have access to my computer now, but I'll send it later if we can't figure it out now.
      I don't think it's the quantity. Quantity seems to be correct.

      Whenever I flatten all / closed all the positions, then reactivate strategy, then the wrong Unrealized PnL (in the strategies tab) comes back to pretty much the same wrong number ($4975).

      It looks like the Unrealized PnL (in the strategies tab) is calculated from the past and not newly opened positions.
      Is there a way to have that calculated from new opened positions when I activate strategy?

      Comment


        #4
        Hello markkm,

        Thanks for the reply.

        In my testing, Unrealized PnL in the strategies tab will only show once a position is taken in the account. There might be a bad value in your NinjaTrader database, please reset your database by going to Tools>Database management>Expand "Reset DB">Click "Reset".

        Test the strategy again after this and let me know if that works for you.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Thank you! this fixed the problem.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by maybeimnotrader, Yesterday, 05:46 PM
          2 responses
          21 views
          0 likes
          Last Post maybeimnotrader  
          Started by adeelshahzad, Today, 03:54 AM
          5 responses
          32 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by stafe, 04-15-2024, 08:34 PM
          7 responses
          32 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by merzo, 06-25-2023, 02:19 AM
          10 responses
          823 views
          1 like
          Last Post NinjaTrader_ChristopherJ  
          Started by frankthearm, Today, 09:08 AM
          5 responses
          22 views
          0 likes
          Last Post NinjaTrader_Clayton  
          Working...
          X