Need help with mql4 code .

TomDominic

Trader
Apr 30, 2023
40
1
14
26
Kenya
Is it possible for single EA to trade more than even three pairs .!?
Post automatically merged:

How can i do it .!? Plzz plus a code will be very helpfull .
 

Ara

Trader
Apr 24, 2023
107
19
19
34
Is it possible for single EA to trade more than even three pairs .!?
Post automatically merged:

How can i do it .!? Plzz plus a code will be very helpfull .
Yes, it is possible for a single Expert Advisor (EA) to trade more than three currency pairs. In fact, many EAs are designed to trade multiple currency pairs simultaneously in order to diversify their trading portfolio and potentially increase profits.
 

TomDominic

Trader
Apr 30, 2023
40
1
14
26
Kenya
Yes, it is possible for a single Expert Advisor (EA) to trade more than three currency pairs. In fact, many EAs are designed to trade multiple currency pairs simultaneously in order to diversify their trading portfolio and potentially increase profits.
Post automatically merged:

Add it to three different pairs and the problem is solved.
 

TomDominic

Trader
Apr 30, 2023
40
1
14
26
Kenya
Soo I can just load an EA to the chart of every pair i am intending to trade in the same same device (( Iam using a laptop )).
Hope soo ...
 

grantcause

Trader
Aug 29, 2023
6
1
8
58
Brisbane, Queensland, Australia
Hey @TomDominic you don't need to load a separate EA onto each pairs chart. You can code it so you have a single EA on a chart that trades multiple pairs. Just loop through the pairs you are interested in and apply the buy / sell rules to each pair. Make sure all your functions are passing in an asset as a parameter or have the asset as a global variable that you update in the loop though the multiple pairs. Have a function that updates the assets point, digits and pip values as they can be different depending on the pair. i.e. JPY pairs. Then use those in the calculations required for stop loss, take profit, etc. Rest of the code to take a trade, close a trade, etc. can be the same for all pairs.