Download MetaTrader 5

Examples: Practical Application of Cluster Indicators in FOREX

To add comments, please log in or register
Do you know that MQL5 is an object-oriented language?
MetaQuotes Software Corp.
MetaQuotes Software Corp. 2007.09.03 15:30 

New article Practical Application of Cluster Indicators in FOREX has been published:

Cluster indicators are sets of indicators that divide currency pairs into separate currencies. Indicators allow to trace the relative currency fluctuation, determine the potential of forming new currency trends, receive trade signals and follow medium-term and long-term positions.

Author: Simeon Semenych

MQL4 Comments
MQL4 Comments 2008.01.03 19:36  

Thanks for your indicators and explainations.

For those that use statistical arbitrage it is more visually obvious that currencies are "rebalanced" or re-weighted by looking at your image of "Balance Line" where CFP crosses the zero line we must make a mark on the price chart to see if re-weighting is appreciating, depreciating or staying equal.

Very good illustrations. Thank you. I wish to hear more on this subject from traders using these indicators.

MQL4 Comments
MQL4 Comments 2008.10.01 19:10  

Thanks for indicators.

It seems they do not refresh on its own.

Looking forward to hearing from you.


MQL4 Comments
MQL4 Comments 2009.02.18 12:55  

Can someone make a MTF version of CCp and CFp indicator and oblige.


MQL4 Comments
MQL4 Comments 2009.11.22 05:42  

May I suggest that you update your indicator code to allow for brokers that use alternate names for the various pairs, i.e.- EURUSDjfx. Some brokers add these suffixes to the currency names and this breaks your code. You could add a new property called "suffix" and allow the use to enter the appropriate value.

Thanks for the excellent insight in all this.

xqq 2009.12.08 21:43  

First Of All thanks for this massive job, i liked it alot,

I have a suggestion though

I noticed that i need to open all 8 Pairs charts and switch between them to get the updates, so the indicators can draw, Is there a solution for this problem for example an indicator to to this downloading thing for all 8 pairs with their time frames without bother opening these charts. ?

nano fx
nano fx 2010.06.19 20:19  


It is a great work,

MQL4 Comments
MQL4 Comments 2012.05.17 15:33  

This is an interesting work, but when I looked at the source code I have some doubts.

I can see in the source code, that you use two moving averages with different lengths, that are computed this way for each currency pair:

double EURUSD_Fast = ma("EURUSD", Fast, MA_Method, Price, i);
double EURUSD_Slow = ma("EURUSD", Slow, MA_Method, Price, i);

The ma-method then calls the iMA method to compute the moving average:

res += iMA(sym, tf, per*k, ma_shift, Mode, Price, i);

Regarding the changes of currency strength, you iterate through the currency pairs, and compute it based on the two moving averages in this way:

arrUSD[i] += EURUSD_Slow / EURUSD_Fast - 1;

So you divide the two moving averages with different length to see if there is an uptrend or downtrend, subtract 1, and add this up.

But just take a look at this example of moving averages on Wikipedia:

You have a green line (reflecting the Dow Jones in this case, but it can also be an exchange rate), and in the image below you have two moving averages of different lengths.

As you can see, starting from December, the green line has many ups and downs, a real zig zag of increases and decreases. However, if you look in the image below, the difference of the two moving averages is always positive. So you constantly add up currency strength, although the green line also has downtrends and not only uptrends. It´s not a matter of the length of the moving averages if it is 30 and 90 days, or 3 or 5 days, because you can also construct this for 3 to 5 days. Just replace the months on the scale with days. Therefore, I have some doubts that it works correctly this way.

jintian yang
jintian yang 2014.11.13 02:54  
Thanks for your indicators and explainations. I will try to understand it.
rask 2016.07.05 16:48  

Hi all


i am having problem loading CCP unot my H1 & h1 live account but they works normal on my demo.  May i know why pls.  

pls advise me


thk u 

To add comments, please log in or register