Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

GetAccountValue not Working NT7

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

    GetAccountValue not Working NT7

    Hello NT Forum. I have read several posts of traders attempting to position size their trades based on their current account value. One common function keeps coming up and it is GetAccountValue(AccountItem.CashValue).

    I am attempting a simple print statement to verify the statement pulls my actual account value and on both my live trading account as well as SIM it prints 0 to the output window.

    Can someone help me figure out what I'm doing wrong?

    Thanks.


    Brian

    #2
    Originally posted by brirob14 View Post
    Hello NT Forum. I have read several posts of traders attempting to position size their trades based on their current account value. One common function keeps coming up and it is GetAccountValue(AccountItem.CashValue).

    I am attempting a simple print statement to verify the statement pulls my actual account value and on both my live trading account as well as SIM it prints 0 to the output window.

    Can someone help me figure out what I'm doing wrong?

    Thanks.


    Brian
    ref: https://ninjatrader.com/support/foru...38&postcount=1

    Comment


      #3
      Many thanks! The print statement in the second segment of code worked perfectly so now I'm going to investigate the first segment of code. I know I can get to the account value now for sure.

      BR,


      Brian

      Comment


        #4
        Thank you, koganam for your response.

        Hello Brian,

        Thank you for your post.

        GetAccountValue(AccountItem.CashValue) will only work in real-time and does not pull a value historically.

        Please let me know if you have any questions.
        Last edited by NinjaTrader_PatrickH; 10-04-2017, 10:44 AM.

        Comment


          #5
          Agreed

          Thanks Patrick; that is how I understood the functionality also and my print test was within a strategy enabled on my live trading account in a real time situation.

          That is what baffles me and why I submitted the post.

          Any ideas?



          Brian

          Comment


            #6
            Originally posted by brirob14 View Post
            Thanks Patrick; that is how I understood the functionality also and my print test was within a strategy enabled on my live trading account in a real time situation.

            That is what baffles me and why I submitted the post.

            Any ideas?



            Brian
            There is not much more to it than that. If you read the entire thread in which I originally placed that response, you will see so. Realtime only, but the method must still be called with the correct syntax, or it, identically, returns zero.
            Last edited by koganam; 06-04-2018, 11:52 PM. Reason: Corrected spelling.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by TraderBCL, Today, 04:38 AM
            2 responses
            7 views
            0 likes
            Last Post TraderBCL  
            Started by martin70, 03-24-2023, 04:58 AM
            14 responses
            105 views
            0 likes
            Last Post martin70  
            Started by Radano, 06-10-2021, 01:40 AM
            19 responses
            606 views
            0 likes
            Last Post Radano
            by Radano
             
            Started by KenneGaray, Today, 03:48 AM
            0 responses
            4 views
            0 likes
            Last Post KenneGaray  
            Started by thanajo, 05-04-2021, 02:11 AM
            4 responses
            471 views
            0 likes
            Last Post tradingnasdaqprueba  
            Working...
            X