Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What is current Unrealized profit on open position?

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

    What is current Unrealized profit on open position?

    How do i find out what is the current unrealized profit on an open position?

    I have a strategy that i want to check what the current unrealized profit and based on that profit, i would like to move my stop loss up to a certain point.

    How can i code this properly? I don't want to know the last trade as that trade is already closed. I want to know current open position.

    #2
    Using this function: https://ninjatrader.com/support/help...profitloss.htm
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Hello priceisking,

      Thanks for your post.

      Position.GetUnrealizedProfitLoss() could be used to get the unrealized PnL for the strategy position as QuantKey_Bruce noted.

      See the help guide page shared by QuantKey_Bruce and linked below for more information about Position.GetUnrealizedProfitLoss() and sample code.

      Position.GetUnrealizedProfitLoss(): https://ninjatrader.com/support/help...profitloss.htm
      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment


        #4
        Thank you!!

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        90 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        135 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        68 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        120 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        69 views
        0 likes
        Last Post PaulMohn  
        Working...
        X