Interacting currency pairs

 

Hello experts

I am a newcomer and I have just started to read Kovalyov's book so to learn to write program codes in MQL4.

However I am not sure if it is worth doing that. Indeed my strategy is based on interacting currency pairs:

that is, I buy, say, 5 different pairs with prices a,b,c,d,e and if certain algebraic function f(a,b,c,d,e) >0

I wish to be alerted in order to close all position at the same time. Now my impression is that MQL4 allows to write

only codes dealing with ONE curency pair. That is I drag and drop by mouse the compiled code into a window

opened just for ONE currency pair.


Is it possible to write a program code simultaneously processing the data form several currency pairs?


Many thanks


Oliver

 

Write an EA that gets & trades in multiple currency pairs? yes

Backtest an EA that uses multiple currency pairs? Not easily (I don't know how, but others here might comment)

 
brewmanz:

Write an EA that gets & trades in multiple currency pairs? yes

Backtest an EA that uses multiple currency pairs? Not easily (I don't know how, but others here might comment)


Thanks. Does it mean that I should open the windows of all currency pairs involved and to drag the compiled EA to whatever of those

windows?

 
radoxyz:

Thanks. Does it mean that I should open the windows of all currency pairs involved and to drag the compiled EA to whatever of those

windows?

To add to Brewmanz answer:

Multiple Currency and/or Multiple TimeFrames EA's for MT4:

1) MT4 Multi-pair/TF strategies DO work on Demo (forward trading) or Live Accounts
So...no need to open all currency pairs if running on Demos or Live accounts. Just open one pair and put the EA on it to watch the trades.

2) MT4 Multi-pair/TF strategies do NOT work with the MT4 Strategy Tester
And the MT4 Strategy Tester cannot open more than one window/test at a time - one pair/one time frame only. You would have to set the EA to test one pair and one TF at a time and change it for each pair/TF to test the strategy in the EA.

3) The MT5 platform is supposed to be able to do Multi-Currency and Multi-TF's in the MT5 Strategy Tester, Demo and Live accounts.

Hope this helps,
Robert
 
cosmicbeing:
To add to Brewmanz answer:

Multiple Currency and/or Multiple TimeFrames EA's for MT4:

1) MT4 Multi-pair/TF strategies DO work on Demo (forward trading) or Live Accounts
So...no need to open all currency pairs if running on Demos or Live accounts. Just open one pair and put the EA on it to watch the trades.

2) MT4 Multi-pair/TF strategies do NOT work with the MT4 Strategy Tester
And the MT4 Strategy Tester cannot open more than one window/test at a time - one pair/one time frame only. You would have to set the EA to test one pair and one TF at a time and change it for each pair/TF to test the strategy in the EA.

3) The MT5 platform is supposed to be able to do Multi-Currency and Multi-TF's in the MT5 Strategy Tester, Demo and Live accounts.

Hope this helps,
Robert


Thank you, Robert
Reason: