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