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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      164 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      318 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      246 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      350 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      179 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X