USDX (MetaTrader indicator) | FREE Forex Trading Indicator

USDX (MetaTrader indicator) calculates the dollar index (USDX or DXY) using the currency pairs EUR/USD, USD/JPY, GBP/USD, USD/CAD, USD/CHF, and USD/SEK. The following is the calculation formula:

USDX = 50.14348112 × EURUSD-0.576 × USDJPY0.136 × GBPUSD-0.119 × USDCAD0.091 × USDSEK0.042 × USDCHF0.036



The resulting indicator is similar to USDX, an ICE-traded dollar index. The index was first published in 1973, with a value of 100. The rules for calculating it were only updated once, in 1999, to reflect the introduction of the euro.

The indicator is presented in the form of candlesticks (MT5) or a line (MT4), with two removable and customizable moving averages. The indicator is displayed in a separate chart window and can be used to supplement research on any dollar-based currency pair.

Although the USDX indicator is available for both the MT4 and MT5 platforms, the MT5 version is far more robust than the MT4 version, offering faster, more accurate, and up-to-date index calculation. MetaTrader 5 displays the entire candle, whereas MetaTrader 4 users must choose which line to draw — Open, High, Low, or Close.

It is very simple to adapt the provided USDX indicator to calculate and display any other currency index.

EUR/USD, USD/JPY, GBP/USD, USD/CAD, USD/CHF and USD/SEK currency pairs should be added to your Market Watch window for this indicator to work. You might need to modify the input parameter IndexPairs for currency pairs to reflect their names given by your broker.

If the indicator displays incorrectly, try reloading it, for example, by adjusting the timeframe of the chart.

Input parameters

Input parameters used in both MT4 and MT5 versions of USDX:

  • IndexPairs (default = “EURUSD, USDJPY, GBPUSD, USDCAD, USDSEK, USDCHF”) — currency pairs’ names to use in calculation.
  • IndexCoefficients (default = “-0.576, 0.136, -0.119, 0.091, 0.036, 0.042”) — currency pairs’ coefficients to use in calculation. The order of coefficients matters; each coefficient corresponds to its currency pair.
  • IndexInitialValue (default = 50.14348112) — initial value for USDX calculation.
  • MA_Period1 (default = 13) — period of the first moving average. Set to 0 to turn it off.
  • MA_Period2 (default = 17) — period of the second moving average. Set to 0 to turn it off.
  • MA_Mode1 (default = 0) — method of calculation of the first moving average: 0 — MODE_SMA, 1 — MODE_EMA, 2 — MODE_SMMA, 3 — MODE_LWMA.
  • MA_Mode2 (default = 0) — method of calculation of the second moving average.

Input parameters only for MT4 version of USDX:

  • USDX_PriceType (default = 0) — type of price to display for USDX: 0 — PRICE_CLOSE, 1 — PRICE_OPEN, 2 — PRICE_HIGH, 3 — PRICE_LOW, 4 — PRICE_MEDIAN, 5 — PRICE_TYPICAL, 6 — PRICE_WEIGHTED.

Input parameters only for MT5 version of USDX:

  • MaxBars (default = 500) — maximum number of bars to calculate the indicator on. Set to 0 for unlimited bars calculation.
  • MA_PriceType1 (default = PRICE_CLOSE) — type of price to calculate the first moving average on.
  • MA_PriceType2 (default = PRICE_CLOSE) — type of price to calculate the second moving average on.
  • EventNumber (default = 191) — number of the event for MCSpy indicator. You do not have to modify this parameter if you do not use MCSpy for some other indicators or expert advisors.

USDX Indicator Chart Example in MetaTrader 4:

USDX Indicator Example MetaTrader 4 Chart

USDX Indicator Chart Example in MetaTrader 5:USDX Indicator Example MetaTrader 5 Chart

As you can see, the indicator looks very different depending on the MetaTrader platform version used. Furthermore, the MT5 version is a true multi-currency indicator that reacts instantly to every tick in any of the index currency pairs.

While the USDX cannot provide trading signals on its own, it can be used in conjunction with the chart of a dollar-based currency pair. It may be a good idea to buy when the USDX falls but the currency pair rises, or to sell when the USDX rises but the currency pair falls. Such divergence would indicate that the currency pair is significantly stronger than the other components of the dollar index.

Another advantage of this indicator is the use of the USDX moving average to detect the current trend.

Downloads

USDX for MetaTrader 4 in .zip

USDX for MetaTrader 4 in .mq4

USDX for MetaTrader 5 in .zip


You May Also Like ❤ :

Leave a Reply

Your email address will not be published. Required fields are marked *