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 maybeimnotrader, Yesterday, 05:46 PM
            4 responses
            23 views
            0 likes
            Last Post maybeimnotrader  
            Started by frankthearm, Today, 09:08 AM
            6 responses
            24 views
            0 likes
            Last Post frankthearm  
            Started by adeelshahzad, Today, 03:54 AM
            5 responses
            33 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by stafe, 04-15-2024, 08:34 PM
            7 responses
            32 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by merzo, 06-25-2023, 02:19 AM
            10 responses
            823 views
            1 like
            Last Post NinjaTrader_ChristopherJ  
            Working...
            X