Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Acount GetAccountValue Issue

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

    Acount GetAccountValue Issue

    Hello Support,

    I am trying to get the CashValue property of the account in USD. This is how i am trying to use it:

    Code:
    double accountValue = Account.GetAccountValue(AccountItem.CashValue, Currency.UsDollar).Value;
    But, accountValue is always retuned 0. I am testing it on a simulation account with a simulated datafeed.

    Using the following code returns me the accountValue:

    Code:
    double accountValue = GetAccountValue(AccountItem.CashValue);
    Please advise.

    Thanks.
    Umer

    #2
    Umer, please use the documented and supported approach you use in your second snippet, as I would not have an expected outcome for the other undocumented usage. Generally it would be important to note that historical access would not be possible in any way for those.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hello Bertrand,

      I am not using it for historical purposes anyways.

      If the first snippet is unsupported, is there a direct way (as snippet 1 does) to get an account's value in US Dollars?

      Thanks
      Umer

      Comment


        #4
        Umer, I would expect the value reported itself should be in USD per default, even if you're seeing a different currency sign that's just for reporting / localization and it would not mean the value itself is converted over.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Hello Bertrand,

          Thank you for the prompt reply.

          Actually, our client needs this to be set as generic as possible because they may use it with an account with EUR as base currency, or AUD. So, if i correctly understood you, that wouldn't be a problem.

          Please confirm.

          Thanks
          Umer

          Comment


            #6
            Correct Umer, we would not convert it but take what the provider technology reports here.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by tsantospinto, 04-12-2024, 07:04 PM
            7 responses
            126 views
            0 likes
            Last Post aligator  
            Started by futtrader, 04-21-2024, 01:50 AM
            5 responses
            56 views
            0 likes
            Last Post NinjaTrader_Eduardo  
            Started by PeakTry, Today, 10:49 AM
            0 responses
            2 views
            0 likes
            Last Post PeakTry
            by PeakTry
             
            Started by llanqui, Today, 10:32 AM
            0 responses
            5 views
            0 likes
            Last Post llanqui
            by llanqui
             
            Started by StockTrader88, 03-06-2021, 08:58 AM
            45 responses
            3,994 views
            3 likes
            Last Post johntraderuser2  
            Working...
            X