Dead end???

 
Hi, Since a long time ago when I was first made familiar with forex I observed a correlation, so to speak, between different pairs and especially the majors and I've had this idea since to use one pair say GBPUSD as an indicator of price movement in another say like EURUSD .Is there a way to attach an EA to one pair and send orders to the other pair? any ideas would be appreciated.
 
An EA is NOT limited to placing orders / recieve market information for the current chart only - it can overlook an unlimited number of pairs simultaneously.
What determines this is what pairs you have displayed under your market watch.
When making your EA you just have to be sure all the pairs you need for calculations are diplayed there.

You should look into learning MQL. It is much easier than one would think and I believe your idea would be reality within a month if you are a Swift learner.
Thereby not saying it would be profitable, of that I have no idea or opinion.

Best of luck!

/ McKeen
 
An EA is not limited to placing orders/getting information for the current chart only, but it can not be used in the tester.
You might also like http://www.correlationcode.com/
 

Thank you both. I have studied MQL and yes it's quite easy to use. I have written the code of my EA but when I test it on EURUSD and I want to send an order to GBPUSD The error is that there is no symbol called EURUSD. " unknown symbol name GBPUSD for OrderSend function"
What should I do?

 
farhang:

Thank you both. I have studied MQL and yes it's quite easy to use. I have written the code of my EA but when I test it on EURUSD and I want to send an order to GBPUSD The error is that there is no symbol called EURUSD. " unknown symbol name GBPUSD for OrderSend function"
What should I do?


You are possibly using a broker with a symbol prefix, try this:

Open your market watch and look at the full symbol prefix as displayed there.
If it displays anything else than EURUSD (example pair) - such as EURUSDm or EURUSDx etc...

Then change your ordertrigger to: OrderSend(Symbol(EURUSDx),,,,,,);

Also try using Print("Ordersenderror: "+GetLastError()); if you haven´t already....

/ McKeen

 
No that is not the problem because I don't get any errors when I use the same symbol name on the same pair; so the problem isn't that I'm using the wrong symbol name or that I'm misspelling it or anything of that sort. I want to know this: is it possible to use ordersend for a different currency pair than the one you are testing your EA on in the tester? if the answer is yes can you tell me why I keep getting OrderSend error 4106? and if not then how can I test an EA that uses correlation as a strategy?
 
farhang:
...is it possible to use ordersend for a different currency pair than the one you are testing your EA on in the tester?

No.


...if not then how can I test an EA that uses correlation as a strategy?

You can find info in the article "Break Through The Strategy Tester Limit On Testing Hedge EA" -> https://www.mql5.com/en/articles/1493.
 
gordon:

No.


You can find info in the article "Break Through The Strategy Tester Limit On Testing Hedge EA" -> https://www.mql5.com/en/articles/1493.


Thanks gordon.
Reason: