Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Account CashValue

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

    Account CashValue

    Hello, i can see in the NT7 Control Center the Accounts tab with a lot of info.
    Its possible access to it from my strategy code?
    I am need known the CashValue of my broker account in realtime.
    Its possible?
    Thank you


    #2
    Hello,

    Thanks for your note.

    You can get this with the following code:

    http://www.ninjatrader.com/support/h...countvalue.htm

    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Hello Brett, thank you very much for your answer.

      Yes, i found that but the output of GetAccountValue(AccountItem.CashValue) or GetAccountValue(AccountItem.BuyingPower) always was 0 (zero).

      ( When i tested today Saturday i was connecting in demo (Sim101) with a lease licensed )

      Itr possible select the account in the code?


      Thanks

      Comment


        #4
        Hello,

        The account that is selected is the account that you run the strategy on. This is set in the strategy parameters.

        If it has a value of 0 this most likely indicates that you ran this code on the Sim101 account in historical or backtest. As this value is only available in realtime.


        Let me know if I can be of further assistance.
        BrettNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        65 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        35 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        59 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        51 views
        0 likes
        Last Post CarlTrading  
        Working...
        X