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

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)
    JimNinjaTrader Customer Service

    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



        Brandon H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cre8able, Today, 03:20 PM
        1 response
        9 views
        0 likes
        Last Post cre8able  
        Started by fiddich, Today, 05:25 PM
        0 responses
        3 views
        0 likes
        Last Post fiddich
        by fiddich
         
        Started by gemify, 11-11-2022, 11:52 AM
        6 responses
        804 views
        2 likes
        Last Post ultls
        by ultls
         
        Started by ScottWalsh, Today, 04:52 PM
        0 responses
        4 views
        0 likes
        Last Post ScottWalsh  
        Started by ScottWalsh, Today, 04:29 PM
        0 responses
        7 views
        0 likes
        Last Post ScottWalsh  
        Working...
        X