Currency Strength Score/Index formula - page 2

 
Alain Verleyen:
IT IS the calculations. Think about it, you are using present values to calculate past values. Your calculations are all wrong.

I'm going by what Stuart has said which is to calculate from open to current price but instead of calculating from open I'm calculating from a candle close value in the past to current price. This is what is giving me the percent change over time. I then use that percent change over time to draw my lines. I added all the percent changes together to test the math and they all added to zero so I know I have correlation.

 
Alain Verleyen:
IT IS the calculations. Think about it, you are using present values to calculate past values. Your calculations are all wrong.

OK I think I figured out what you are saying. Instead of calculation from current price to close price of a separate candle I need to calculate from the open to the close of the same candle so when it iterates through the loop the lines draw correctly?

 
SirFency:

I'm going by what Stuart has said which is to calculate from open to current price but instead of calculating from open I'm calculating from a candle close value in the past to current price. This is what is giving me the percent change over time. I then use that percent change over time to draw my lines. I added all the percent changes together to test the math and they all added to zero so I know I have correlation.

Stuart did not state to use the current open price. You want an open price from the past and calculate for each bar from past to present. 

 

Thank you Alain, and Enrique. Without your comments I would have been continuing to chase my tail. I have finally got it. Now that I have an accurate currency strength indicator I can combine it with a stochastics indicator and build an EA.

Working

 
SirFency:

Thank you Alain, and Enrique. Without your comments I would have been continuing to chase my tail. I have finally got it. Now that I have an accurate currency strength indicator I can combine it with a stochastics indicator and build an EA.


Welcome. Happy you got it.
 
SirFency:

Thank you Alain, and Enrique. Without your comments I would have been continuing to chase my tail. I have finally got it. Now that I have an accurate currency strength indicator I can combine it with a stochastics indicator and build an EA.


In plotting those lines, do the number of bars (not candlesticks) matter to show the curves? I download one good Currency strength indicator before that works by reading correlation between 8 pairs and the author mentioned (also in the standard input) that no of bars = 90. It doesnt matter whether the number is 900 or 9000, 90 is good enough. So does the number of bars required to show the curves, and in what way?
 

Wow ! I just realized I never said thank to no one on that topic which has been particularly useful for me. 

Forum on trading, automated trading systems and testing trading strategies

Currency Strength Score/Index formula

Stuart Browne, 2015.02.01 02:34


I prefer to use "raw" currency strength rather than abstract values that some currency strength indicators use. And it's simple. You simply add up all moves in each currency pair. This is normally done on the 8 major currencies (28 pairs).

So to get say AUD's current strength you would look at each pair AUD is in and see how much it has moved (in percentage terms) from open to current price. Remember that a positive or negative move will depend on if the AUD is the base or quote of a pair. So the (exaggerated) calculation would look something like this:

AUDCAD = 2.2%
AUDCHF = 1.8%
AUDJPY = 2.5%
AUDNZD = 1.2%
AUDUSD = 1.6%
EURAUD = -2.3% (so + 2.3%)
GBPAUD = -1.9% (so +1.9%)

Total = 13.5%

You don't then divide it by 7 to get an average. You want the raw strength and 13.5% is it. That is the current strength of the Aussie compared to the other 7 currencies. You now do the same calculation for each of the other currencies.

If you've done it correctly, when you add up all 8 currencies, the final answer should be......zero! Why? Currency correlation :)

You can then display the results as either a meter, or as I prefer, a line study. This way you can see the change over time and rate of change to see which is gaining strength, which is losing strength and the speed or strength of the change. So you end up with something like this:


CSI

</Rant>  :)
 

As I remember it is that answer from Stuart that has definitively clearify the thing to me.

So thank you to all, I've done it my way and I'm quite proud of :) 

 

Hello everyone,

Very interesting. I'm trying to develop my own :)

Does it make any sense to use this indicator as a stand alone for making an EA? and does it makes sense to calculate the strength in other timeframes?

regards,

PS

 
Does it make any sense to use this indicator as a stand alone for making an EA?

I would do it that way. Keep your EA's and Indicators separate. Use iCustom() to pull the values you need.

and does it makes sense to calculate the strength in other timeframes?

Of course . . . if that's what your strategy requires. For example, you might watch the currency strength of CAD from the H1 to the H4 to the Daily to see how it's shaping up.

 
Stuart Browne:


.... You don't then divide it by 7 to get an average. You want the raw strength and 13.5% is it. That is the current strength of the Aussie compared to the other 7 currencies....

The mathematically correct way is to divide it by 8.
The correlation matrix consists of 8 items.
You then get the real, undistorted percentage value of each currency that can be used for further calculations.
This is essential if you want to use the values as features in machine learning tools.