This is one of our favorite features — you can test your portfolio EA using MT4’s Strategy Tester and then analyze the results using MT4 Tracker, just as you would using MT4’s Account History report. By default, MT4’s Strategy Tester does not keep track of magic numbers because it assumes each EA contains a single strategy. However, by adding a little bit of code to the portfolio EA’s OnDeinit() function then when back testing completes we can create a log file with a list of all the trades and their corresponding magic numbers. MT4 Tracker can analyze these back testing results in the same way as it does the Account History report. In this way you can prune the portfolio EA to remove potentially poor-performing strategies *before* adding your portfolio EA to an account.
You can access this feature from the main menu by selecting Tools / Open Tester Log…. From there you will need to navigate to MetaTrader’s “..\tester\files” folder. If you don’t know where this folder is located, you can easily find it from within MetaTrader by selecting File / Open Data Folder. The ‘tester’ folder is in the same directory as MetaTrader’s ‘terminal.exe’ program. As you can see from the image above, the name of the log file follows a specific format — e.g. StrategyTester_[Symbol]_[Period]-[ExpertName].log.