Forex Factory (https://www.forexfactory.com/forum.php)
-   Platform Tech (https://www.forexfactory.com/forumdisplay.php?f=69)
-   -   An indicator for the strength of a currency (https://www.forexfactory.com/showthread.php?t=925836)

Gauer Jun 25, 2019 8:10am | Post# 81

{quote} Something that I've missed is that, this daily indicator is the difference between current price and the open price of the day and updates each day! How do we change the formula so that we can monitor, for example, one year? I think that for this case, I would not use daily open price as the reference, rather, I would take zero level as the reference. In other words, I would utilize price itself as the criterion. So, the formula at the first post will be changed to this: for ( j = each pair of currency ) currency = currency + iClose(...
Hi there brother, thanks for replying.

I don't quite understand... If I load your indicator and keep scrolling back in time, won't it will be plotted below the whole history of the chart? I mean, can you tell the indicator that you want it to use N number of bars in the calculation, instead of using the whole history? That is the look back period. If you wanna use one year, then the indicator will calculate 365 bars instead of calculating the whole chart history. I don't see why you would need to change the formula.

Rafei Jun 25, 2019 9:58am | Post# 82

{quote} Hi there brother, thanks for replying. I don't quite understand... If I load your indicator and keep scrolling back in time, won't it will be plotted below the whole history of the chart? I mean, can you tell the indicator that you want it to use N number of bars in the calculation, instead of using the whole history? That is the look back period. If you wanna use one year, then the indicator will calculate 365 bars instead of calculating the whole chart history. I don't see why you would need to change the formula.
Hi.
Thank you.
The original formula which is stated at the first post, has an origin in time which is the open time of the day and week. So, for instance, in daily, when a new day is come, all values return to zero.

Any way, the answer is yes,
I can write the code so that the user can determine the look-back period.
But, if I am wrong please correct. The COT is the net positions in trades, so, we should not consider the price itself? I mean the formula which I mentioned in the last posts.

Gauer Jun 25, 2019 10:44am | Post# 83

{quote} Hi. Thank you. The original formula which is stated at the first post, has an origin in time which is the open time of the day and week. So, for instance, in daily, when a new day is come, all values return to zero. Any way, the answer is yes, I can write the code so that the user can determine the look-back period. But, if I am wrong please correct. The COT is the net positions in trades, so, we should not consider the price itself? I mean the formula which I mentioned in the last posts.
Instead of using the NET positions, you gonna use the currency strength value as if it were volume, we don't need to take price in consideration because we are interested in the output of the Strength_waves_all_daily_101.ex4 only , the same way we don't take price in consideration in COT index formula. The strenght waves all daily indicator is already using the price to output the strength value. We just want to know the extremes that happened in history to feed the indicator and give it a period for calculation, and then check the index to see if we are approaching a potential reversal based on currency strength value. That is what the COT Index does, it compares the current (today value) with the max and min values you feed it and plots the index so you know when you are approaching extremes. The look back period works as a sensitivity parameter.

Rafei Jun 25, 2019 11:39am | Post# 84

{quote} Instead of using the NET positions, ....
Thank you for detailed explanation.

I am really sorry, but I don't understand the meaning of maximum and minimum in the past, when we are calculating the strength of each currency at each day separately (using Strength_waves_all_daily_101.ex4)!

1- According to the formula, we recalculate the strength of each currency according to the price changes made by that currency in each day. For instance, if we want to calculate the strength of AUD against 7 other major currencies, then we calculate the following formula (which was stated at the post #33):

AUD[i] = ( currentPrice(i,AUDCAD) - dayOpenPrice(AUDCAD) ) / dayOpenPrice(AUDCAD);
AUD[i] = AUD[i] + ( currentPrice(i,AUDCHF) - dayOpenPrice(AUDCHF) ) / dayOpenPrice(AUDCHF);
AUD[i] = AUD[i] + ( currentPrice(i,AUDJPY) - dayOpenPrice(AUDJPY) ) / dayOpenPrice(AUDJPY);
AUD[i] = AUD[i] + ( currentPrice(i,AUDNZD) - dayOpenPrice(AUDNZD) ) / dayOpenPrice(AUDNZD);
AUD[i] = AUD[i] + ( currentPrice(i,AUDUSD) - dayOpenPrice(AUDUSD) ) / dayOpenPrice(AUDUSD);
AUD[i] = AUD[i] - ( currentPrice(i,EURAUD) - dayOpenPrice(EURAUD) ) / dayOpenPrice(EURAUD);
AUD[i] = AUD[i] - ( currentPrice(i,GBPAUD) - dayOpenPrice(GBPAUD) ) / dayOpenPrice(GBPAUD);

in which, i is the time and we are comparing the current price of each pair with its daily open price (for each day).
Is this OK?

2- Or you want to know how does the strength of each currency change over a long period of time (for instance 365 days as look-back period)?
If this is the case, then we should revise the formula as following:

AUD[i] = ( currentPrice(i,AUDCAD) - dayOpenPrice(AUDCAD) ) / pastPrice(AUDCAD);
AUD[i] = AUD[i] + ( currentPrice(i,AUDCHF) - pastPrice(AUDCHF) ) / pastPrice(AUDCHF);
AUD[i] = AUD[i] + ( currentPrice(i,AUDJPY) - pastPrice(AUDJPY) ) / pastPrice(AUDJPY);
AUD[i] = AUD[i] + ( currentPrice(i,AUDNZD) - pastPrice(AUDNZD) ) / pastPrice(AUDNZD);
AUD[i] = AUD[i] + ( currentPrice(i,AUDUSD) - pastPrice(AUDUSD) ) / pastPrice(AUDUSD);
AUD[i] = AUD[i] - ( currentPrice(i,EURAUD) - pastPrice(EURAUD) ) / pastPrice(EURAUD);
AUD[i] = AUD[i] - ( currentPrice(i,GBPAUD) - pastPrice(GBPAUD) ) / pastPrice(GBPAUD);

in which, pastPrice is the price in 365 days (look-back period) ago.

Which case is true?

Please excuse me for confusion.

Gauer Jun 25, 2019 12:56pm | Post# 85

@Rafei

My friend, it is really simple. You load the Daily strength indicator, let's say you are interested in the latest price action, let's say three months (90 days). You gonna scroll your chart back 3 months and you will analyze the maximum and minimum currency strength values, let's say the max was 4 and min was 4,5. That is it. Then the window of calculation (look back) will be 90 bars (90 days).

So

100 * (X-B)/(A-B)

100 * (X - 4,5)/(4 - 4,5)

X is the current value of strength, the output of the currency strength indicator. So if the lookback period is 90 bars, the indicator will plot the index always using 90 bars looking in the past, from present day. You can use any look back period you want, 90, 180, 365, 1000, I donīt see the need to mess with the formula. The only thing that is gonna keep updating in the formula is the X, cause each day (or bar) will have a different X, obviously.

I can't see why you would mess with the formula of the daily strength indicator, you want it's output.

Rafei Jun 25, 2019 3:14pm | Post# 86

@Rafei My friend, it is really simple. ...
OK dear Gauer, I got it. I will code it and inform you.

Thank you for complete explanation.

Chake Jun 26, 2019 12:16pm | Post# 87

@Rafei My friend, it is really simple. You load the Daily strength indicator, let's say you are interested in the latest price action, let's say three months (90 days). You gonna scroll your chart back 3 months and you will analyze the maximum and minimum currency strength values, let's say the max was 4 and min was 4,5. That is it.
min/max values dont have to be looked up manually, the code can do that for you, much easier and a lot faster.

Gauer Jun 26, 2019 1:39pm | Post# 88

{quote} min/max values dont have to be looked up manually, the code can do that for you, much easier and a lot faster.
But you don't want the exact max and min values, you want a little bit less. I prefer entering the values myself. Also, this way the indicator is more flexible, you can put any value you want. It is good practice to go back in time and study the chart, and see how price reacted when the indicators reached the extreme levels. If you focus only on the far right side of the chart you miss the big picture.

Rafei Jun 27, 2019 5:26am | Post# 89

1 Attachment(s)
{quote} But you don't want the exact max and min values, ...
I was very busy in the last two days. But, I have created the indicator for COT of strength. Please find it at the first post.

The figure bellow, is a picture of the USDJPY chart and the COT indicator in 15 min time-frame:

Click to Enlarge

Name: 2019-06-27_13-53-23.png
Size: 65 KB

Please give your feedback.
Thanks.

Gauer Jun 27, 2019 7:38am | Post# 90

Thanks a lot Rafei!

I can't test the indicator I am away from home this week, my notebook is just for browsing the internet and on top of that it is linux, if it were windows I could download MT4 and check the indicator.

So how do you think it worked, on your opinion? Did you experiment a bit inputting different max and min values and different look back periods? Can you take a screenshot of the options? I can see that even though this is 15min, when the black line reached the max levels the price turned! From up to down first, then from down up. There is something interesting in there.

Also, I recommend changing the name of the indi to CSI (currency strength index), I have a regular COT indicator and it would get confusing.

Cheers!!

Pivot Ruler Jun 28, 2019 8:17am | Post# 91

{quote} I was very busy in the last two days. But, I have created the indicator for COT of strength. Please find it at the first post. The figure bellow, is a picture of the USDJPY chart and the COT indicator in 15 min time-frame: {image} Please give your feedback. Thanks.
Hi Rafei,

I found a website that will also show the strength of a currency, but yours is a lot more convenient.

https://currency-strength.com/

You have to click on the top right button to get a 5 minute update on the website.

Take Care

Rafei Jun 30, 2019 8:27am | Post# 92

... So how do you think it worked, on your opinion? Did you experiment a bit inputting different max and min values and different look back periods? ... Also, I recommend changing the name of the indi to CSI (currency strength index), ...
Thanks dear Gauer.

I had no time to check the indicator until now. But, it is interesting to see that when a currency index is upper than the other (for instance, when USD is upper than JPY), then it is a confirmation of increasing of the price (USDJPY is increasing) and vice versa.

Rafei Jun 30, 2019 8:29am | Post# 93

{quote} Hi Rafei, I found a website that will also show the strength of a currency, ...
Hi dear Pivot Ruler, thanks a lot for such a great site. It produces very similar signals.

energyliger Jul 2, 2019 4:23am | Post# 94

2 Attachment(s)
Hello TS, I need help in developing currency strength that looks like in the attachment. The features are similar to yours (It compares the movement of 8 major currency), however the currency strength indicator in the attachment had different features:

1. The value changes every second
2. The value ranges from 1 to 100. 50 being flat, below 40 is weak and above 60 is strong

Do u know how to create this type of CSM? Cos i need the exact formula so i can use it in my EA and I really need the formula to create that


Thanks a million
Click to Enlarge

Name: Screenshot1.png
Size: 27 KB
CSM(2019.12.31).ex4

energyliger Jul 3, 2019 6:06am | Post# 95

1 Attachment(s)
Im looking forward to know the formula to create currency strength like the photo in the attachment below. Wondering if TS Rafaei, or any of the FX geniuous know what is the formula, so i can code it on MT4 and MT5

Here are the features

1. It works by comparing movement between 8 major currencies
2. When login to your MT account, you need to download all the 8 major pairs and the chart first so the numbers shown on the indicator would be accurate (it reads the data from 8 major currencies, hence need to download the chart first after all)
3. The numbers are from 0 to 100 (below 40 is considered weak, above 60 is considered strong)
4. The numbers shown in the currency strength (0 to 100) changes every second on all timeframes. Be it on M1, M5, M15, H1, H4 or D1, the currency strength changes every second (my assumption means that it reads the data based on current timeframe and note that the current price always change every second, hence the Currency strength amount changes every second
5. It has 2 decimal places
6. When you open the .ex4 file, there are 2 inputs:
- Number of bars = 90
- Moving Average Periods to Smooth Lines = 0
Those are the standard inputs
7. Number of bars = 90 does NOT refer to 90 candlesticks. It refers to the number of bars used to show the curves, so it does not matter whether the input is 90, 900 or 9000. 90 is enough
8. MA period = 0 means that the 8 curves (refer to the 8 curves of the major pairs) will not be processed by moving averages


Based on these data, can any FX genious helps to create the formula used to create the currency strength?

Thanks a million. Lets post the results here so all of us, FX traders all around the world can learn together
Click to Enlarge

Name: Screenshot2.png
Size: 27 KB

Rafei Jul 3, 2019 9:56am | Post# 96

Im looking forward to know the formula to create currency strength like the photo in the attachment below. ... {image}
Dear energyliger,
Hi.
Thanks for your indicator and description.
There are many possibilities about creating such an indicator. But, the base formula is the same as the indicator presented at the first post. Sorry, but I can not help in this case.
I know that you can use the output of the indicator and create your own calling this indicator.
Good luck.

thisara1 Jul 3, 2019 10:12am | Post# 97

1 Attachment(s)
{quote} Dear energyliger, Hi. Thanks for your indicator and description. There are many possibilities about creating such an indicator. But, the base formula is the same as the indicator presented at the first post. Sorry, but I can not help in this case. I know that you can use the output of the indicator and create your own calling this indicator. Good luck.
thank you Rafei | i am use same view commercial indicators no needed anymore purchases
Click to Enlarge

Name: Screenshot_443.jpg
Size: 203 KB

Rafei Jul 3, 2019 10:17am | Post# 98

{quote} thank you Rafei ... {image}
Very good dear thisara1,
Please give us your feedback and tell us about your method of using Currency Strength indicator, if is possible.
Thanks.
Good luck.

timingchain Jul 3, 2019 10:47am | Post# 99

5 Attachment(s)
Rafei,

Have you studied CCFp? It has been around many years, though I do not think very highly of it. t=635569 is a long running thread on the concept based on CCFp

Since you are experimenting now and want help, making your source code open could help your effort. You have no obligation, of course.

I have an EA tool for making such entries and exits quickly and accurately: Magnificent Seven EA. It does -not- tell user what to do--user tells EA what to do.

Example (demo acct) and attachments:
Magnif7_User_01.pdf
Magnif7_2.60_tc.ex4
#BLANK.tpl
TradeReport.ex4
Click to Enlarge

Name: USD_dn_190109-f.png
Size: 28 KB

Rafei Jul 3, 2019 12:28pm | Post# 100

Rafei, Have you studied CCFp? ...
Hi timingchain,
Thank you very much for the indicator. It looks very interesting.
I think that most strength indicators show similar signals, however, different traders do different interpretations. Some take into account crossing of the signals and others prefer to consider strength and weakness levels. Some calculate the index and others make MAs.
I am working on the relation between USD signal and Gold chart.
But, I do not find a promising method or strategy to trade currencies using currency strength.


© Forex Factory