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 bortz, 11-06-2023, 08:04 AM
            47 responses
            1,610 views
            0 likes
            Last Post aligator  
            Started by jaybedreamin, Today, 05:56 PM
            0 responses
            9 views
            0 likes
            Last Post jaybedreamin  
            Started by DJ888, 04-16-2024, 06:09 PM
            6 responses
            19 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by Jon17, Today, 04:33 PM
            0 responses
            6 views
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            16 views
            0 likes
            Last Post Javierw.ok  
            Working...
            X