Page 1 of 4

US Dollar Index [Upd May, 05]

PostPosted: Sun Apr 11, 2010 8:36 pm
by Nikolay.Gekht
May, 05 USD/SEK added since it supported for all available connections.

The USD Index measures the performance of the US Dollar against a basket of currencies.

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

Please, note, that you must be subscribed for all instruments required to calculation: EUR/USD, USD/JPY, GBP/USD, USD/CAD, AUD/USD and USD/CHF. If at least one of the instruments is not subscribed, the indicator fails!

usdx.png


Download:
USDX.lua
(6.08 KiB) Downloaded 7668 times


Bar Chart Version (option)
USDX.lua
(8 KiB) Downloaded 5399 times


Tick Time Frame Version
Tick USDX.lua
(6.07 KiB) Downloaded 3127 times


Notice
Tick based USDX Bar chart high/low values can differ from regular USDX bar cart.
This is because such values are calculated on the basis of only four data points, (Open, High, Low, Close) values. The true historical USDX bar chart High Low values can deviate from the obtained in this way.

The indicator was revised and updated

Re: US Dollar Index

PostPosted: Wed Apr 14, 2010 2:49 am
by highrise
Hi Nikolay,

This is interesting and thanks for the indicator. But the indicator has lot of noise and this can be smoothed by using MA instead of close price and that way, it looks better. I have couple of questions on the formula: 1. How did you derive this formula? I think the result would be better if you include AUDUSD. 2. The indicator values are progressive (by itself and differes between time period also) so it is kind of difficult to judge the high or low. Any thoughts on how it can be set to operate between fixed values?

regards

Re: US Dollar Index

PostPosted: Thu Apr 15, 2010 6:18 pm
by Nikolay.Gekht
highrise wrote:This is interesting and thanks for the indicator.

You are welcome!

highrise wrote:But the indicator has lot of noise and this can be smoothed by using MA instead of close price and that way, it looks better.

Hm... doesn't applying the Moving Average on the results of USDX indicator give us almost the same?

snapshot.PNG


highrise wrote:1. How did you derive this formula? I think the result would be better if you include AUDUSD.

The formula is published in many places, for example here:
http://www.babypips.com/school/how_to_r ... _inde.html

All I did is I removed the USD/SEK because not all connections provides it and distributed it's coefficient among other currencies using the formula
currency coeff / sum(curr coeff except USD/SEK) * coeff USD SEC

highrise wrote:2. The indicator values are progressive (by itself and differes between time period also) so it is kind of difficult to judge the high or low. Any thoughts on how it can be set to operate between fixed values?

Oh, this is the question not for me. :-(

I'm a programmer, not a trader, so I can explain anything from the point of view of the mathematics and programming, but my trading experience is pretty poor. And I have no chance to improve it really because for guys like for me the markets are closed. "Are you employed by the market institution or by the company related with market institution..." question in any customer agreement is about me. Yes, I am :-).

I'll point to this post to the market analyst who is working with our site. Probably they can provide a better explanation.

Re: US Dollar Index

PostPosted: Fri Apr 16, 2010 1:17 am
by highrise
Hi Nikolay,

Thanks for the explanations. Applying MA makes it look definitely better! The link was helpful and I was able to check some more sites and learned some more on the formula.

As for me, I am a semi-programmer & trader (don't do either of the job correctly !!) and spent quite some learning mq4 and am not so keen to learn lua. I replicated the formula in mq4 and am experimenting the formula on other possibilities apart from MA - like RSI. So obviously it doesn't play within a range across timeframes. One way may be to read the highs and lows and draw a zigzag.. I will update you if I am successful and maybe you can port it to lua.

regards.

Re: US Dollar Index

PostPosted: Fri Apr 16, 2010 1:34 am
by Apprentice
You're right, the formula is not correct, Nikolay described the reasons for discrepancies.

USDX is not an indicator but an indicator of strength of the dollar against basket of currencies, weight of individual currencies in the formula as the very USDX formula, are defined, can not be changed.

And any further deviation from the given formula, it would be counterproductive.

The index can be treated as a currency pair, on which, you can apply the tools of technical analysis.

Any thoughts on how it can be set to operate between fixed values?

Theoretically, index do not have limited range of movement, can go from zero to infinity.

I agree that the index may be outdated, due to the lack of AUD in its calculation, and other currency pairs, which increased its market share.

I suggest making equal weight index, which would include the AUD / USD and other currency pairs in which the USD is a component.

And, Currency correlation indicator, which showed how one currency moves against any other currency.

http://fxtradeinfocenter.oanda.com/charts_data/fxcorrelations


As for the averaging, if you apply averaging, you get a late indication.

Similarly, there is no point in charting the average of the EUR / USD currency pair,
instead of current price.

USDX can be considered a separate entity, not an indication.

Re: US Dollar Index [Upd May, 05]

PostPosted: Thu May 06, 2010 1:32 am
by Nikolay.Gekht
May, 05. Updated.

Re: US Dollar Index [Upd May, 05]

PostPosted: Wed Sep 22, 2010 7:38 am
by Apprentice
Bar Chart Added.

Re: US Dollar Index [Upd May, 05]

PostPosted: Wed Sep 22, 2010 4:31 pm
by yasirali1974
Hi,

1. its not loading on hourly chart
2. is it possible for you to explain the circle as at the time of market open usdx shows market already down?
any suggestion why like this?

regards.

Re: US Dollar Index [Upd May, 05]

PostPosted: Thu Sep 23, 2010 5:24 am
by Apprentice
1. I can not find a reason for it.
I corrected a potential bug, maybe it helps.

2.This is the result of code inheritance from Line version.
The algorithm ignores the last period, last period have same value as the previous .
I have adapted an algorithm that does not draw the final candle.

Re: US Dollar Index [Upd May, 05]

PostPosted: Fri Sep 24, 2010 5:16 am
by Apprentice
Related to the first problem.
I reported the problem to the developers of the platform.
They found a bug in the platform, which will be fixed in the next official release.