Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

testing the GetAccountValue() method

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

    testing the GetAccountValue() method

    NT Support,

    I am wondering if I could please canvas a suggestion from yourselves?

    I’ve been looking to work with GetAccountValue; I am wondering what NT’s recommendation would be to on how to test in development and testing the GetAccountValue() function?

    As far as I can see, there is no way to test properly, prior to putting any strategy live, if the right values are being returned and that a strategy is functionality correctly with the values being returned from this function if it only ever delivers 0 when testing on historical values.

    This thread is the closest I’ve found to touching on this subject: http://www.ninjatrader.com/support/f...ad.php?t=30920

    Could I get your view on this?

    Thanks and regards,

    drolles

    #2
    Hello,

    Thanks for your forum post.

    This method is a live only value:
    Method Return Value
    A double value that represents the specified account item. A value of 0 will be returned on historical bars.

    Also, this value may or may not be availiable live. Please check out the following page live: If it is availiable it should work.

    Broker Provided Information:


    Let me know if I can be of further assistance.


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

    Comment


      #3
      Brett,

      Thanks for the reply. And thank you also for the description of the functionality. However, that wasn’t quite the question.

      Could you please take a look at paragraph two of the original post? What I’m after here is a NT Supports’ view and recommendation.

      Thanks,

      drolles

      Comment


        #4
        Hello,

        Only way I know to test is to hard code in a variable that would be your (Account Value), then add and substract wins a losses from it.

        Make sure to comment any code you add around this feature as you may want to swap this out for GetAccountValue() once you go live.

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

        Comment


          #5
          Brett,

          Thanks for your reply.

          Thanks for the suggestion, but I’m thinking that this doesn’t really test the GetAccountValue() method and use of it, does it?

          What I’m after here is a suggestion from NT on how best to test this functionality? There must have been a vision when the functionality was implemented w.r.t how it would be tested and used by the developer community. For example, during its development a testing framework must have been put into place (test scenarios / test cases). I’m looking to leverage from that work which is already done to benefit the community. When a strategy is going live a critical part of effectively implementing the strategy is to size the positions correctly.

          If you personally are not aware of that or were not involved in that, can I suggest that you reach out to the person / people (e.g. Jason / Bertrand?) who were to seek their views?

          Thanks and regards,

          Dan

          Comment


            #6
            Hello,

            Bertrand is out for the week I will reach out to Josh to check to see if there is a method to test this. I expect the answer to be the same however.

            Thanks for your patience.
            BrettNinjaTrader Product Management

            Comment


              #7
              Hello,

              GetAccountValue() should work with the Sim101 account when your running the strategy Simulted Live. Is this what your trying to do?

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

              Comment


                #8
                To clarify, this is a real-time only property. You cannot use this in backtesting.
                Josh P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                649 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                370 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                109 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                573 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                576 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X