Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Currency trading - getting account size

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

    Currency trading - getting account size

    Hi,

    I would like to do position sizing calculations in my strategy, could you advise how I can retrieve the account size from MB trading through ninajtrader?

    Is GetAccountValue(AccountItem accountItem) able to do the trick?

    If I am connected to both Kinetick and MBT, is ninjatrader capable of knowing which account to pull the account size from? How does it differentiate which account to use? Is there a need to specify the account?

    WBH

    #2
    Hello,

    GetAccountValue is what you're looking for.

    This property will only be aware of the account value from the account the strategy is running on. This means that as long as you have set the "account" field to your MBT account, it will pull the account size from that account only. It is not possible to pull the account value from an account the strategy is not running on.

    Please note that the MBTrading adapter has a limitation where the account items such as CashValue are not immediately available upon connection. In order to call this information, you must initiate a trade on the MBT API.

    With this in mind, you could setup a simple test to check the CashValue and should it not be returned, you can please a limit order well be low the current market price and immediately cancel the order. Once the trade API has been called in this manner, your AccountItems should be available to you.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Hi

      Please note that the MBTrading adapter has a limitation where the account items such as CashValue are not immediately available upon connection. In order to call this information, you must initiate a trade on the MBT API.
      Could you advise how can I set this API up ?


      With this in mind, you could setup a simple test to check the CashValue and should it not be returned, you can please a limit order well be low the current market price and immediately cancel the order. Once the trade API has been called in this manner, your AccountItems should be available to you.
      Do I need to have the paid version of Ninjatrader to get this working ?

      Comment


        #4
        The MBT API can be setup by following the stesp below:

        Click here to take me to the MB Trading Connection Guide

        Yes, you will need the paid version of NinjaTrader to access your live account balance.
        MatthewNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        637 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        366 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        107 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        569 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        571 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X