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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    46 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    31 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X