Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

account.GetAccountItem() Currency

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

    account.GetAccountItem() Currency

    The account class has a GetAccountItem method which takes an AccountItem Enum, and a Currency enum.

    e.g. account.GetAccountItem(AccountItem.CashValue, Currency.BritishPounds).

    From what I can tell the second parameter doesn't do anything, rather it just returns the account item denominated in the currency of the account. Is this correct? Is there any useful reason for this second parameter?


    #2
    Hello kevinenergey,

    Thanks for your post.

    Account.Get() documentation states that the parameter is required, but does not affect the return result. Your observations are correct.

    Currency

    The account currency the value should be denoted (required parameter, but has no effect on returned value)

    Comment


      #3
      This issue is still there. The following code only returns the value of the underlying account currency, which in this case is Canadian. I want to return the USD value. There is nothing wrong with my code, but the function is not returning USD.

      Account.GetAccountItem(AccountItem.RealizedProfitL oss, NinjaTrader.Cbi.Currency.UsDollar).Value

      When I look at the IB Account in TWS, it DOES show the value of the USD, and the CAD in the account page.

      Can you let me know if there is a fix for this please?

      Comment


        #4
        Hello DaFish,

        Thanks for your notes.​

        Account.GetAccountItem() is not a documented/supported NinjaScript method.

        You should use Account.Get() as noted by NinjaTrader_Jim on post # 2. The Currency parameter being passed into Account.Get() does not affect the return result.

        See this help guide page for more information about Account.Get(): https://ninjatrader.com/support/helpGuides/nt8/get.htm

        We are tracking interest in an existing feature request ticket to add the ability to automatically convert currency and fetch exchange rate and I have added your vote. This request is being tracked under the number SFT-5039.

        As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted on the Release Notes page of the Help Guide.

        Release Notes — https://ninjatrader.com/support/help...ease_notes.htm



        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5
          Originally posted by NinjaTrader_BrandonH View Post
          Hello DaFish,

          Thanks for your notes.​

          Account.GetAccountItem() is not a documented/supported NinjaScript method.

          You should use Account.Get() as noted by NinjaTrader_Jim on post # 2. The Currency parameter being passed into Account.Get() does not affect the return result.

          See this help guide page for more information about Account.Get(): https://ninjatrader.com/support/helpGuides/nt8/get.htm

          We are tracking interest in an existing feature request ticket to add the ability to automatically convert currency and fetch exchange rate and I have added your vote. This request is being tracked under the number SFT-5039.

          As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted on the Release Notes page of the Help Guide.

          Release Notes — https://ninjatrader.com/support/help...ease_notes.htm



          Please count me in also !
          Thanks :-)

          Comment


            #6
            Hello SnailHorn,

            A vote has been added.

            Comment


              #7
              Originally posted by NinjaTrader_Jesse View Post
              Hello SnailHorn,

              A vote has been added.
              Thanks Jesse. Awesome!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              556 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              324 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              101 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              545 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              547 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X