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 inanazsocial, Today, 01:15 AM
            0 responses
            2 views
            0 likes
            Last Post inanazsocial  
            Started by trilliantrader, 04-18-2024, 08:16 AM
            5 responses
            22 views
            0 likes
            Last Post trilliantrader  
            Started by Davidtowleii, Today, 12:15 AM
            0 responses
            3 views
            0 likes
            Last Post Davidtowleii  
            Started by guillembm, Yesterday, 11:25 AM
            2 responses
            9 views
            0 likes
            Last Post guillembm  
            Started by junkone, 04-21-2024, 07:17 AM
            9 responses
            70 views
            0 likes
            Last Post jeronymite  
            Working...
            X