US Dollar Index [Upd May, 05]

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Moderator: admin

US Dollar Index [Upd May, 05]

Postby Nikolay.Gekht » Sun Apr 11, 2010 8:36 pm

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 7664 times


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


Tick Time Frame Version
Tick USDX.lua
(6.07 KiB) Downloaded 3120 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
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: US Dollar Index

Postby highrise » Wed Apr 14, 2010 2:49 am

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
highrise
 
Posts: 2
Joined: Wed Apr 14, 2010 2:40 am

Re: US Dollar Index

Postby Nikolay.Gekht » Thu Apr 15, 2010 6:18 pm

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.
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: US Dollar Index

Postby highrise » Fri Apr 16, 2010 1:17 am

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.
highrise
 
Posts: 2
Joined: Wed Apr 14, 2010 2:40 am

Re: US Dollar Index

Postby Apprentice » Fri Apr 16, 2010 1:34 am

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.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36258
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: US Dollar Index [Upd May, 05]

Postby Nikolay.Gekht » Thu May 06, 2010 1:32 am

May, 05. Updated.
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC


Re: US Dollar Index [Upd May, 05]

Postby yasirali1974 » Wed Sep 22, 2010 4:31 pm

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.
Attachments
usdx1hr.png
usdx15min.png
usdxdaily.png
yasirali1974
 
Posts: 24
Joined: Sat Jul 10, 2010 1:30 pm

Re: US Dollar Index [Upd May, 05]

Postby Apprentice » Thu Sep 23, 2010 5:24 am

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.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36258
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: US Dollar Index [Upd May, 05]

Postby Apprentice » Fri Sep 24, 2010 5:16 am

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.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36258
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Next

Return to Custom Indicators

Who is online

Users browsing this forum: Baidu [Spider], Majestic-12 [Bot] and 11 guests