Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to calculate daily PnL of all trades in an account

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

    How to calculate daily PnL of all trades in an account

    Hi,

    What is the best way to calculate the daily pnl on an account if I have a strategy running at the same time I am placing discretionary trades and need to track the performance of both activities?

    For example: If I start the day trading discretionarily, then start the strategy, I would like the strategy to be able to calculate the pnl from the trades I made prior to starting the strategy.

    Does AccountItem.GrossRealizedProfitLoss provide this data, or is there another method for calculating all trade data for the current trading day?

    Thanks in advance

    #2
    Hello Newbie-NT-Scriptor,

    Thanks for your post.

    You could consider using <Account>.Get() to get the AccountItem.RealizedProfitLoss value which returns the Realized PnL value of an account. Or, you could consider getting the AccountItem.GrossRealizedProfitLoss value of an account.

    The difference between the account Gross Realized and Realized is that the Realized will have commissions and fees deducted.

    The difference between the strategy realized and account realized, is the strategy realized will only have completed trades made by the strategy, for the entire lifetime of the strategy (for as many days as it has placed orders) while the account realized has all trades on all instruments and is reset to 0 every day.​

    See the help guide documentation below for more information.

    Account: https://ninjatrader.com/support/help...ount_class.htm
    <Account>.Get(): https://ninjatrader.com/support/helpGuides/nt8/get.htm
    AccountItem: https://ninjatrader.com/support/help...ccountitem.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

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    134 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
    118 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X