Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cash Value

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

    Cash Value

    Hey everyone,

    Does anyone know of any bugs when it comes to bringing in the account cash value? I use it for a position sizing algo but it seems to "sometimes" not pull in the data. I.E. when I print the cash value it "sometimes" returns 0. Other times it works.

    This is the syntax I am using to bring in Cash Value.

    Code:
    GetAccountValue(AccountItem.CashValue)
    Code:
    Print(GetAccountValue(AccountItem.CashValue))
    Cheers

    SodyTexas

    #2
    Please check the Accounts tab and ensure there is a value reported for the account you wish to get this at that time.

    Also note that a value of 0 will be returned on historical bars. To ensure you are checking the account item on real-time data, you can check if you're on historical data:

    //only run on real time data
    if(!Historical)
    GetAccountValue(AccountItem.CashValue)
    MatthewNinjaTrader Product Management

    Comment


      #3
      Ohh shoot your right, I am broke.. Ha ha J/K, that would suck; the account value is showing. I will add the syntax you provided and give it a try. Thank you.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      558 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X