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 AaronKoRn, Today, 09:49 PM
          0 responses
          6 views
          0 likes
          Last Post AaronKoRn  
          Started by carnitron, Today, 08:42 PM
          0 responses
          8 views
          0 likes
          Last Post carnitron  
          Started by strategist007, Today, 07:51 PM
          0 responses
          9 views
          0 likes
          Last Post strategist007  
          Started by StockTrader88, 03-06-2021, 08:58 AM
          44 responses
          3,975 views
          3 likes
          Last Post jhudas88  
          Started by rbeckmann05, Today, 06:48 PM
          0 responses
          9 views
          0 likes
          Last Post rbeckmann05  
          Working...
          X