Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Clarification of AccountItem Object

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

    Clarification of AccountItem Object

    Hello.

    I am working on a Ninja 8 script strategy. I would like the strategy to evaluate the daily gross REALIZED P/L of an account. I am using the Account.Get method as follows ...

    Account.Get(AccountItem.{insert account item}

    for the above... the {insert account item} I am seeking a better understanding of their meaning...


    AccountItem.CashValue
    ===================
    I am assuming that this is returning the account balance. I am also assuming that this value is NOT affected by margins or unrealized profit and losses from open positions Is this assumption correct?

    AccountItem.RealizedProfitLoss
    =========================
    I am assuming that this value returns the profit or loss obtained in a single trading day? I am also assuming that this value resets upon the start of a new trading day? At what time of the day is the reset? 5PM CST when the Globex markets start to open?

    The strategy has two targets A maximum daily loss and a maximum daily profit. When either target is reached, the strategy stop executing new orders. This strategy will be allied to multiple markets (ES/ GC ect..) so it needs these values to be account wide and not based on the activity of what occurred on a specific instrument.


    I also have a need to determine the unrealized P and L of an open position of the instrument the strategy is applied. I am using Position.GetUnrealizedProfitLoss() method for this purpose.

    #2
    What is the difference between:
    AccountItem.RealizedProfitLoss
    vs
    AccountItem.GrossRealizedProfitLoss

    Comment


      #3
      Hello jeliner, and thank you for your questions.

      AccountItem.CashValue refers to the current cash value of the account, as returned by the broker. This will include any fees that the brokerage has assessed factored into the total.
      The difference between realized and gross realized profit and loss, is that gross realized does not factor in commissions and fees. Both compare winning against losing trades in accord with the formulae on this page, https://ninjatrader.com/support/help.../?8_0_0_12.htm
      To reliably determine when account status has been updated or reset, you should subscribe to AccountStatusUpdate using code such as the sample code here, https://ninjatrader.com/support/help...atusupdate.htm .

      Please let us know if there are any other ways we can help.
      Jessica P.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      58 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      133 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      73 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      45 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      50 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X