Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AMP: GetAccountValue(AccountItem.CashValue) always return 0

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

    AMP: GetAccountValue(AccountItem.CashValue) always return 0

    Hi,

    I have an account with AMP. When I execute:

    double AccountBalance;
    AccountBalance = GetAccountValue(AccountItem.CashValue);

    AccountBalance is 0. Even though the balance on the account is not 0.

    Ideas?

    Thanks.

    #2
    Hello futures14,

    Thank you for your post.

    Are these historical bars or backtesting in which the value is 0?

    Comment


      #3
      Hi Patrick,

      This is using my live account. Not backtesting. Not historical bars.

      I am trying to get my account balance on the OnStartUp method.

      Thank you.

      Comment


        #4
        Hello futures14,

        OnStartUp() would not have any details on the account values.

        Comment


          #5
          HI Patrick,

          Thank you for the reply.

          I moved the method from OnStartUp() to OnBarUpdate() and it is working now.

          Thanks.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          149 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          84 views
          1 like
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          129 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          125 views
          1 like
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          102 views
          0 likes
          Last Post CarlTrading  
          Working...
          X