Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Creating Dollar Index

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

    Creating Dollar Index

    can the dollar index be derived in Ninjascript using GBPUSD, EURUSD, AUDUSD, AUD/CAD, NZDUSD, USDCAD, USDCHF, USDJPY etc.?

    #2
    Hello, thanks for writing in. The USDX is not a default instrument in the NinjaTrader database, so you would need to research which data provider will provide this index for charting and create a new instrument in the database.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      ok thanks, I understand that you can pay to get the dollar index but wouldn't it be a cheaper/more convenient option to create your own indicator
      with the option of adding your own symbols & weightings? (even better if we could plot a formula (or ratio) in NT8)

      e.g. majors formula: USDEUR * USDGBP * USDAUD * USDNZD * USDCAD * USDCHF * USDJPY

      e.g. emerging formula: USDCNH * USDZAR * USDNOK * USDSEK * USDRUB

      and a similar exercise for any other index/ratio you wish to create
      Last edited by dibDab; 05-30-2023, 02:44 AM.

      Comment


        #4
        I'd be happy to make a start on a community indicator?

        1. Find similar script to base it on e.g. https://ninjatraderecosystem.com/use...ownload/ratio/ (anyone know of something better for NT8?)

        2. Keep it simple

        3. Decide what parameters would work (without getting into parsing complex math formula)

        e.g.

        MSFT performance against S&P

        parameter "Top" = MSFT

        parameter "Bottom" = S&P 500

        Dollar Index

        parameter "Top" Top = 50.14348112 x USDEUR^0.576 x USDJPY^0.136 x USDGBP^-0.119 x USDCAD^0.091 x USDSEK^0.042 x USDCHF^0.036

        (if USD is not the base value in the currency cross, the exponent weighting would be negative e.g. EURUSD^-0.576).

        parameter "Bottom" = 1 (set to 1 if left blank)

        evaluate then plot v = Top / Bottom

        ... something like that, all suggestions welcome!
        Last edited by dibDab; 05-31-2023, 06:17 AM.

        Comment


          #5
          Hi, I'd love to be able to use a community US Dollar indicator. I don't know how to code this, but I just read an 2015 article (see below) that has a formula that might work:

          "The DJ FXCM US Dollar Index makes use of a more straightforward methodology based on 4 currencies in equal amounts – AUD, JPY, GBP, and EUR at 25% each."



          Thoughts on this?

          Comment


            #6
            Hello dibDab,

            I am not aware of any existing index or indicator with this specific logic. You could create a custom indicator for this.

            Instruments can be added with AddDataSeries().
            https://ninjatrader.com/support/help...dataseries.htm

            In BarsInProgress 0, the Value[0] plot would be set to Closes[1][0] * Closes[2][0] * Closes[3][0], etc.
            https://ninjatrader.com/support/foru...er#post1182264


            trdrJajaja, Welcome to the NinjaTrader forums!

            Below is a link to a forum post with helpful resources on getting started with NinjaScript and C#.
            https://ninjatrader.com/support/foru...pts#post786040
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by geddyisodin, Today, 05:20 AM
            3 responses
            20 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by lorem, Today, 09:18 AM
            1 response
            4 views
            0 likes
            Last Post lorem
            by lorem
             
            Started by bmartz, Today, 09:30 AM
            0 responses
            3 views
            0 likes
            Last Post bmartz
            by bmartz
             
            Started by GussJ, 03-04-2020, 03:11 PM
            14 responses
            3,245 views
            0 likes
            Last Post GussJ
            by GussJ
             
            Started by ArkansasClint, Today, 09:28 AM
            0 responses
            2 views
            0 likes
            Last Post ArkansasClint  
            Working...
            X