EA with different settings per pair?

I’ve written an EA that only works marginally good, unless at the very least the SL (or TS) and TP are optimized. Problem is they have vastly different results per pair.

I want to run the finished product on at least 4 pairs, and that means custom settings for each one, is such a thing possible, can somebody direct me to a source that explains how?

I’m not that familar with MT4, so any help is appreciated.

I’m also going to run a scalper, short-term/mid-term and long-term strategy per pair, I can put them all in one EA, but are there any advantages to them each having their own chart? Much data is shared between short term and long term trading systems, so they will most likely be on the same one regardless.

Thanks for your help in advance :slight_smile:

I want to emphasize one thing. Do not put currency pair dependent values in your code. Make as many settings as practical for the inputs. Then use setting files to store the different settings for either currency pairs or time frames. These are under the “Save” and “Load” buttons on the EA setup dialog. There is not very much help on the subject, so you may have to experiment with it a bit.

Could you elaborate on that? I’m curious as to why you say that.

Going forward, software maintenance is more difficult if some of the code is currency dependent. It is much easier to change an external setting than to find the right place in code several months later, change it and test it. Plus if a bug is introduced that affects only one pair, it is devilish to find.

Is very simple, make the SL ant TP values extern and change each value on each chart.

extern int TP = 100;
extern int SL = 500;

Be careful not to over optimize.