Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AccountItem.CashValue is 0 on live chart

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

    AccountItem.CashValue is 0 on live chart

    Hello, I have AccoutItem.CashValue being stored correctly in my indicator but when connecting to a live account on live chart it is returning 0. This is not backtesting / not historical bars and my indicator is CalculateOnBarClose = false;

    It returns the value of Sim101 correctly but not my live accounts (FXCM). The CashValue displays properly in the Accounts tab in Control Center. Default value of the var is -1 so I know it's being incorrectly set to 0.

    How to get the correct value?

    #2
    Hello entropy,

    Thank you for your post.

    I tested this out with my own indicator and a demo account with NinjaTrader FXCM and I was able to produce the values.
    Attached is my indicator. Are you doing anything differently?
    Attached Files

    Comment


      #3
      Hi Patrick thank you! I am doing a few things differently--my first goal is to get the code you sent me imported and compiled (I'm using NT7) seems a number of the using declarations are different? Could you send me the file as an NT exported package I can import to NT7 and I'll try to troubleshoot from there?

      Comment


        #4
        Hello entropy,

        Thank you for your response.

        My example was for NinjaTrader 8. In NinjaTrader 7, how are you accessing AccountItem in an indicator?
        Can you post your code to your response?

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        152 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        305 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        244 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        345 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        176 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X