Backtest Results Depend on EA File Name

 
Subject: Backtest Results Depend on EA File Name – Please Review This Critical Behavior

Dear MetaQuotes Development Team,

My name is Somchai Suthimanorom, an EA developer and MetaTrader 5 user.

I would like to report an unexpected and concerning behavior in the MT5 Strategy Tester, which directly affects the accuracy and fairness of backtesting.

🟥 I observed that when backtesting two EAs with **identical code and input parameters**, but with **different file names** (e.g., `z.ex5` and `blueBird.ex5`), the test results were **different**, even though everything else was the same.

🟩 Renaming the files causes the results to **swap**, which strongly suggests that the EA file name is somehow influencing the tick simulation or internal behavior.

This goes against the principle of deterministic testing — the same code, data, and logic should produce the same results, regardless of the file name.

Such behavior makes it difficult to perform fair optimization, regression testing, or performance comparison.

---

⚠️ **Important Note:**

> I am not a professional programmer and my English is limited, so I asked **ChatGPT by OpenAI** to help me analyze and write this message clearly, based on the actual problem I observed myself.

---

### 🙏 Kindly requesting:

1. Please investigate whether EA file names affect tick generation or simulation randomness.
2. If this is unintended, please fix this to ensure consistent results.
3. If this is intended, please explain the design decision or provide a workaround.

Thank you for your time and attention.

Sincerely,  
**Somchai Suthimanorom**

 

No, it is not a case of the file name. It is the case, that you might have a template file with the same name as the EA file, which the tester applies to the chart before running the EA.

Most probably, the EAs code is dependant on some aspect of the chart (e.g. Graphic Objects, Indicators), that the template is affecting.

Strategy Testing - Algorithmic Trading, Trading Robots - MetaTrader 5 Help
You can change the appearance of a chart, show indicators or graphical objects on it using templates. For a template to be applied, its name must match the name of the tested Expert Advisor, for example ExpertMACD.tpl. The template should be placed in folder /profiles/templates of the trading platform.
 
  1. Don't trust Chat-GPT for code and Tester diagnosis. It frequently hallucinates by confusing MQL5 with MQL4.
  2. Go to your MT5==>Data Folder==>MQL5==>Profiles==>Tester, and backup any backtest reports that you want to save, and then delete them from said folder before retesting.