The idea for this EA started in another thread:
Therefore this EA is based on the wonderful EA called “Blessing 3 v3.9.6.09”.
The idea to try to build a multipair version came up in the above mentioned thread. After some brainstorming I began to like the idea. Though Blessing and multipair is kind of a contradiction. Blessing has so many parameters to finetune the EA exactly to your pair to trade, the time frame, your risk and and and.
But anyway it might be worth a try to find some “global settings” that work well for all pairs. Just adjusted to the time frame and other global parameters (risk, broker and and and).
What did I basically do?
- I took the latest source code from the original thread (“Blessing 3 v22.214.171.124”).
- … cleaned it from almost all display output
- … introduced a big struct that holds the variables for the pair to trade
- The start function is running a long “for to” loop over an array of the structs for the pairs to trade
- I took out the hedge function
- only one and fixed magical number to be able to monitor the trades via a dashboard
- ...moved the main part of the holiday check to the beginning of the start function
Sounds simple but gave me some headache as the debug options for bugfixing in MT4 are really poor, compared to a “real” compiler.
I can only perform backtesting with one pair at a time, which is not enough for a multipair EA. In realtime mode I can see whether it is working, but it is difficult to see if it is working in the right way.
Enough words written: please take a look at the code and feel free to give feedback. There are for sure still many open points that I would love to discuss here in this thread.
Especially when it comes to global settings (e.g. number of open trades) that might need to be moved into the struct.
And please play around with different set-files to see which settings come close to “one size fits all” (thx Grand Wazoo). As a good starting point I can recommend the collection from Richard96816, that can be found in this post:
(thanks a million, Richard!)
→ for backtesting, the setting for „Use the 28 default pairs“ must be set to false and in the „comma separated own pair list“ only the symbol (e.g. XAUUSD) that is used in the tester has to be input.
→ for live testing (better on a demo first..) please do NOT use small timeframes and many pairs with only one entry condition. The EA will open, close, modify in such a high frequency, that your broker will close your account faster than you can click. Happened to me ;-)
This is a code for learning and testing purposes only. Everything you do, you do on you own risk!
In no event I will be liable for any damages whatsoever.