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 NullPointStrategies, Today, 05:17 AM
    0 responses
    52 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    70 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X