Coincidence or cointegrated?

 
Hi. My EA trades multiple pairs simultaneously and I encountered a situation today I am trying to understand. Using a custom keltner channel indicator, I received a "BUY"(Long) trade signal from each of these pairs: EURUSD, EURJPY, EURCHF, CADJPY, CHFJPY, AUDJPY within seconds of each other, after waiting weeks. Does anyone know if these specific pairs have historically moved in lock-step with each other? Or maybe this is just simply coincidence? I doubt this is an indicator error because only one out of the six lossed and that loss is approx US$ 0.72,which is just shy of break even. My account is in US$. This might mean that arbitrage trading is where the real profit is.
 
I think that sometimes if there is a big event then they may move the same else they may move different. So they don't always. You have EUR in multiple of your pairs so if EUR moved they will probably respond similarly. How would you trade arbitrage? You can also check this indicator out https://www.mql5.com/en/code/26289
Overlay Chart Modified to not repaint on each bar
Overlay Chart Modified to not repaint on each bar
  • www.mql5.com
Evenly weighted DXY and changeable base currency Currency Index that calculates evenly on all 7 major pairs. Can also change base currency. Based on No Nonsense Forex podcast. Automatically enable or disable the automated trading button Let say you have an EA and you want it to trade in between an interval of time but you do not have the...
 
Interesting article Brian. Upon further consideration, i realize arbitrage might be more than I can handle right now. I think the main lesson here is that trading multiple pairs doesn't mean a  trader is diversifying smartly; because the pairs traded may have a strong hidden relationship. This can also imply that my exposure/risk has been increased, even though the pairs are different. So maybe a better strategy would be to test for correlation before ordering additional pairs, right?
 

Yes I agree with that, I think the correlation may be helpful but not sure if it can reliably be tested since it changes ,I was looking at correlation(100) but again im not sure if it was helpful really. Maybe you have some ideas about testing correlation? 


My idea for a manual strategy for this is to take 2 pairs eg. EurUsd and UsdJpy and overlay the chart with that indicator. Then what I am interested in is trading the convergence and hedging out divergence by offsetting the open trade with and opposite trade. This is not different to a stop loss but the goal is to switch off the hedged trade when you feel comfortable that the two graphs are no longer diverging. This would require analysis and judgement of the candles but atleast the trading strategy is clear (and not confused) about its direction .

The hedge trade can be done as a stop order that trails the candles 

 
I was thinking of calculating the correlation coefficient from a reasonable sample size(perhaps 100) and then doing a hypothesis test on the significance of that figure. I had a look at cointegration but I really don't to go down that rabbit hole and can't come out with something practical.

Your strategy seems solid, however that might not be appropriate for me at this stage because it involves a lot of discretion. I will likely fail as a discretionary trader as I have very little manual trading experience. In fact, I have no manual trading experience since going live in July. 

 
Dwaine Hinds:
I was thinking of calculating the correlation coefficient from a reasonable sample size(perhaps 100) and then doing a hypothesis test on the significance of that figure. I had a look at cointegration but I really don't to go down that rabbit hole and can't come out with something practical.

Your strategy seems solid, however that might not be appropriate for me at this stage because it involves a lot of discretion. I will likely fail as a discretionary trader as I have very little manual trading experience. In fact, I have no manual trading experience since going live in July. 

What about choosing a sample out of the price data for a period of time when the currency was in a nice up trend, and then using that as a constant basis to use statistics to test against what the current price is doing. Therefore maybe the statistics could tell us with what degree of condifence the price is behaving the same currently 
 
Dwaine Hinds:
Interesting article Brian. Upon further consideration, i realize arbitrage might be more than I can handle right now. I think the main lesson here is that trading multiple pairs doesn't mean a  trader is diversifying smartly; because the pairs traded may have a strong hidden relationship. This can also imply that my exposure/risk has been increased, even though the pairs are different. So maybe a better strategy would be to test for correlation before ordering additional pairs, right?

It is always good to investigate. If you look at the symbols on your OP, it is 3 times EUR vs 3 times JPY. Depending on your positions on each (long or short) it defines your exposure. There could be 2 things at play.

Exposure:

For example when buying 1 lot EURUSD you buy EUR and sell USD. Now another opportunity arrives for GBPUSD. Again you buy 1 lot, buying GBP, selling USD. Effectively the exposure to EUR and GBP are the same. Same direction different currency. However exposure on USD is double the size on EUR and GBP. You are at the sell side 2 times on USD with the same volume.

Correlation:

This is when 2 different instruments behave the same and show somewhat the same pattern either positive or negative. 


Both are worth while to consider when trading multiple assets at the same time for managing risk. Correlation and exposure are not the same, but trading correlated instruments also affect the exposure. For example trading both AUD CAD which are both affected by Oil news with impact.

 
I can't find a mql4 statistics library to calculate the z-score or t-score. I was looking at using the "ALGLIB" library but it is not working, as it is loaded with errors. I am hoping someone could provide a little piece of code that I could use because it could take a long while for me to build. For starters it might require the use of calculus.
 
Dwaine Hinds:
I can't find a mql4 statistics library to calculate the z-score or t-score. I was looking at using the "ALGLIB" library but it is not working, as it is loaded with errors. I am hoping someone could provide a little piece of code that I could use because it could take a long while for me to build. For starters it might require the use of calculus.

alglib is working, i used it but you gotta use it correctly

 
Dwaine Hinds:
Hi. My EA trades multiple pairs simultaneously and I encountered a situation today I am trying to understand. Using a custom keltner channel indicator, I received a "BUY"(Long) trade signal from each of these pairs: EURUSD, EURJPY, EURCHF, CADJPY, CHFJPY, AUDJPY within seconds of each other, after waiting weeks. Does anyone know if these specific pairs have historically moved in lock-step with each other? Or maybe this is just simply coincidence? I doubt this is an indicator error because only one out of the six lossed and that loss is approx US$ 0.72,which is just shy of break even. My account is in US$. This might mean that arbitrage trading is where the real profit is.
Hi hello sir please guide/help me i wanna earn money for my financial assistance but i dont give up for this trading. Try and try.
 
Jean Francois Le Bas:

alglib is working, i used it but you gotta use it correctly

Hi  Jean Francois Le Bas. This is what I am getting when I execute " UseAlglib.mq4 ":



MetaEditor


MT4


Please tell what you did to make it work.

Reason: