Forex brokers comparison

Developing a System #2 (Entry system for hedging correlated pairs)

Submitted by Grant


We need a decent entry system for hedging two positively correlated currencies.
These would be EURCHF and USDJPY. The pip cost is almost the same everyday, very close. And the volatility of USDJPY is 26% higher daily range than EURCHF.
So we would sell 1.26 lots of EURCHF, and buy 1 lot of USDJPY.

When the hedge makes for example
(lot1 +lot2)*50 = $113, we close the trade.

I have written a metatrader expert to trade like this, but my entry rules are not getting me in at the best correlation times, and the result many times is the trade widens in loss for a long time. But if somebody out there can figure out how to time the entries better, we will have 3 or 4 profit trades per day. Any ideas?, they are easy for me to code in and send back your expert for all to test.


In pairs trading one often using normalized deviation. Below is quota from "The handbook of pairs trading" by Douglas S.Erhman. BTW this is good book about subject You interested in.



This technique is used in any mean reversion strategy and allows the
trader to compare divergence to a normalized distribution. This provides
cleaner data with which to analyze any given trade. The technique is commonly used to compare a stock’s price with its moving average, the assumption being that the stock price will tend to oscillate around its moving
average. [...]

This process is referred to as a Z transformation and is obtained by taking
the difference between the price of Microsoft and its 10-day moving average,
subtracting the average of the difference, and dividing by the
standard deviation of this difference. As can be seen from the chart, this
normalized deviation oscillates around zero fairly symmetrically. This
relationship could be exploited by trading on the assumption that at a
given level of divergence, there is a high probability that the deviation
will revert to zero."

Let me see your codes. May be I can fix or do some improvement.

Best Regards,
Admin of Viking234.Com

Sorry to drop this bombshell, but usdjpy and eurchf are not positively correlated. try gbpusd and eurusd, or eurjpy and gbpjpy for example. Diablo

Correlation (or CORREL) between two currency pairs is not static, even for some seemingly highly correlated pairs (e.g., GBPUSD*EURUSD, AUDUSD*XAUUSD). Analysts who say a correlation of > 0.90 means the two pairs will move in the same direction 90% of the time can be misleading. What they often didn't say is the number of bars you need to use to calculate the correlation.

CORREL(20), CORREL(50), CORREL(100), and CORREL(200) would give you very different information. If you use the long-period CORREL you mask the short-term reversals. If you use too short a period, the indicator would look almost unreadable. Nevertheless you always need to use at least two periods (two indicator windows), such as CORREL(20) and CORREL(100), in order to figure out the direction of the correlation shift.

Remember correlation can shift, cross and diverge over time, much like the behavior of a price MA. When the correlation of two pairs diverges (i.e., correlation drops out of the region between +/-0.80 and +/-1.00), it would be hard to guess when they would merge again. This is where and when you could sustain losses even when you are hedging.

Also, currency pair correlations presented in matrix/table on FX forums (such as only give traders a snapshot for that moment. This can be really dangerous because traders unfamiliar with correlation may get the impression that the correlation between two pairs is somewhat constant and varies slightly sometimes, which is far from the truth. When I sometimes heard analysts say in news headline like "AUDUSD traded higher on commodity (gold) rally", I often went back to look at my CORREL indicator to check if they really had that right. Sometimes I had the reason not to believe them.

I believe correlation should be used with other indicators in order to give you an edge. Right now I only use CORREL to confirm the news effect or fundamentals from one pair to the other when one pair does not have much news on the newswire. For example, if the more volatile (or leading) pair breaks out, chances are the other positively correlated pair is likely to breach similar resistance or support levels. Correlation is about exploiting time lag to make predictions about the other pairs.

Sorry forgot to include links to the CORREL indicator images:

Correl indicator Forex

Correl indicator Forex

Correl indicator Forex

Could you share the indicator with us?


Sure Edward, will upload it once I finish the quick user guide.

EURCHF and USDJPY are hardly positively correlated (it was for only short moments). If you based your strategy on truth of the moment or impression that these two pairs are positively correlated, then your trade would not be very successful. I wonder if you purposely set up your trade on pair randomness (i.e., correlation between 0.50 and -0.50) in which case you would still lose money when the pairs are moving in into the +/-0.80 region. I also checked the correlation between GBPUSD*EURUSD and EURJPY*GBPJPY as per Diablo's suggestion but they are not much correlated either (see screenshots). You can see that the JPY-relatives are quite different from the AUD-relatives.

Correlating Forex pairs indicator

Correlating Forex pairs indicator


Top Rated Free Forex Indicator...