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

AddOn Management of Real-time Account Balances

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

    AddOn Management of Real-time Account Balances

    Scenario: An AddOn. One Connection to a Futures provider. One Account denominated in EUR. Trading a Futures Instrument. Monitoring Executions via OnExecutionUpdate.

    Questions:
    1. Ignoring all non-transaction-based charges, will an Execution Commission be the full additional transaction charge on top of spread?
    2. Will the Commission be denominated in the Instrument Currency or the Account Currency?
    3. Is the Execution Rate the current Exchange Rate for converting the Instrument denomination to the Account denomination? In this example, if the Instrument is in USD, will the Rate be the rate for EURUSD at the time of the Execution?
    4. By way of tracking Price Action in real time and consequently deriving Account balance changes in real time, is there an AddOn-supported approach that is recommended?
    5. Again, tracking Account balance changes in real time, and noting that there is only one Connection, and it is not a Forex Connection, if the entry Execution Price is known, how does one track the current real time Account balance changes in the Account denomination (i.e. converted in real time using the current Exchange Rate in real time) from that Entry Price if no further Executions occur until Exit? In other words, how can one get the relevant Exchange Rate in real time without a Forex Connection?
    Thanks.
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

    #2
    Hello jeronymite,

    1. the commission would be what you configure in Commissions template https://ninjatrader.com/support/help...ub=commissions
    2. Commissions are based on account denomination
    3. NT automatically converts currencies using CME FX futures https://ninjatrader.com/support/help...TheAccountsTab
    4. There is nothing specific suggested but you could do your own conversions if you wanted. You could get the rate through instruments with a MarketDataUpdate subscription. You should not need to do this if you are fetching from Accounts data.
    5. same answer as above, subscribe to data feed for CME FX futures, like we do already for currency conversions


    Please let me know if I may be of additional assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks, Jesse.

      So, if I understand you correctly:
      • The Execution Commission is always locally calculated using only user-set Commissions, not determined by and communicated from the broker at order execution.
      • Since fetching Account data can be done in real time, will the Account data always accurately reflect real time balance changes as trades execute? If so, those real time balances will be in the Account denomination.
      • To determine conversion Rates, one must have an active Connection to either a Forex data provider or a CME FX Futures data provider. This would apply also in the case of trading Stocks, Indices, Options, etc.
      • If using CME FX Futures data and cross rates are required, one would need to do all required conversions in code. For example, an Instrument denominated in EUR being traded on an Account denominated in GBP would require conversions using 6E and 6B?
      • NinjaTrader provides the time-limited Free NinjaTrader Forex data feed for traders on request. (Thanks!) Presumably, a CME FX Futures data feed would need to be a paid subscription that one independently arranges?
      To generalize, for an AddOn to cater for the possibilities of a trader trading any Instrument type (denominated in any Currency) from an Account denominated in any Currency, with only one single Connection to the Account's Provider, as multiple trades execute can one accurately monitor the real-time (dynamically updated) PnL of an Account, denominated in the Account Currency. If so, presumably this is done by subscribing to AccountItemUpdate? This being so, conversions should not be necessary as they would already have been done in NinjaTrader's underlying real-time Account management activities.

      Grateful for confirmation/correction of the above.

      Thanks.
      Multi-Dimensional Managed Trading
      jeronymite
      NinjaTrader Ecosystem Vendor - Mizpah Software

      Comment


        #4
        Hello jeronymite,

        Since fetching Account data can be done in real time, will the Account data always accurately reflect real time balance changes as trades execute?
        The account data you access is the same that the control center shows, if you see the values updated in the control center then you would see the same from the addon methods.


        If using CME FX Futures data and cross rates are required, one would need to do all required conversions in code. For example, an Instrument denominated in EUR being traded on an Account denominated in GBP would require conversions using 6E and 6B?
        Yes if you needed to do some extra conversion then you would need to do that in your own code and the utilize the specific instruments you wanted for the conversion needed.

        NinjaTrader provides the time-limited Free NinjaTrader Forex data feed for traders on request. (Thanks!) Presumably, a CME FX Futures data feed would need to be a paid subscription that one independently arranges?
        Correct if you needed that data regularly then yes you would need a connection with a subscription to that data.


        This being so, conversions should not be necessary as they would already have been done in NinjaTrader's underlying real-time Account management activities.
        If you use the values from the account directly and see that is the value you wanted then no conversions would be necessary. You would only need to do conversions if you are accessing a value which is not already converted to the type you had intended.


        Please let me know if I may be of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Kensonprib, 04-28-2021, 10:11 AM
        5 responses
        191 views
        0 likes
        Last Post Hasadafa  
        Started by GussJ, 03-04-2020, 03:11 PM
        11 responses
        3,229 views
        0 likes
        Last Post xiinteractive  
        Started by andrewtrades, Today, 04:57 PM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        7 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        441 views
        0 likes
        Last Post Delerium  
        Working...
        X