スポンサーリンク
MT4 Backtest Not Working: Strategy Tester Causes and Fixes

When an MT4 backtest does not work, the problem is not always inside the EA code. In many cases, Strategy Tester is using the wrong symbol, timeframe, date range, spread, historical data, or optimization settings.
This guide explains common reasons why MT4 Strategy Tester does not start, produces no trades, shows no useful result, or stops during optimization. Use it as a troubleshooting checklist before trusting or analyzing a backtest report.
Quick answer:
If an MT4 backtest is not working, check the Strategy Tester settings first: symbol, timeframe, model, date range, historical data, spread, EA inputs, and the Journal and Experts tabs. Many “no trade” cases are caused by settings or entry conditions that never become true, not by a broken EA.
If an MT4 backtest is not working, check the Strategy Tester settings first: symbol, timeframe, model, date range, historical data, spread, EA inputs, and the Journal and Experts tabs. Many “no trade” cases are caused by settings or entry conditions that never become true, not by a broken EA.
Common Reasons Why MT4 Backtesting Does Not Work
| Symptom | Common Cause | What to Check First |
|---|---|---|
| The test does not start | Missing data, invalid EA setting, or initialization error | Journal tab and Experts tab |
| No trades are opened | Entry conditions never trigger or the wrong test settings are used | Symbol, timeframe, spread, date range, and EA filters |
| The result looks empty | No trades, too short a test period, or no valid history | Report tab, date range, and History Center data |
| Optimization does not progress | Too many combinations, invalid input ranges, or initialization failures | Optimization ranges and log messages |
| Results change unexpectedly | Historical data, spread, modeling method, or broker data changed | Data source, model, spread, and test period |
No Trades in Strategy Tester
A backtest can run normally but still produce zero trades. This usually means that the EA did not find any valid entry condition during the test period.
Check these points first:
- The selected symbol matches the EA’s intended symbol.
- The selected timeframe matches the EA logic.
- The test period includes enough historical data.
- The spread is not too high for the EA’s spread filter.
- The lot size, Magic Number, and input parameters are valid.
- Time filters, indicator filters, and volatility filters are not blocking every trade.
Tip:
Add temporary
Add temporary
Print() messages around the entry conditions.
If the EA never reaches the final entry block, the problem is usually a condition filter rather than OrderSend() itself.Print("Spread=", MarketInfo(Symbol(), MODE_SPREAD));
Print("Hour=", Hour(), " EntrySignal=", entrySignal);
Print("Lots=", Lots, " UseTrading=", UseTrading);Wrong Symbol, Timeframe or Date Range
Strategy Tester must match the assumptions used by the EA. A moving-average EA designed for EURUSD H1 may behave very differently if you test it on another symbol or timeframe.
| Setting | Common Mistake | Fix |
|---|---|---|
| Symbol | Testing a different pair from the EA’s target pair | Select the symbol used by the strategy |
| Timeframe | Running M5 when the EA was designed for H1 | Use the timeframe assumed by the EA |
| Date range | Testing a period with little or no history | Extend the test period or prepare historical data |
| Visual mode | Assuming the EA is frozen without watching price movement | Use visual mode to confirm chart movement and signals |
Missing or Poor Historical Data
If MT4 does not have enough historical data for the selected symbol and date range, Strategy Tester may not run correctly or may show messages such as TestGenerator: no history data in the Journal.
Historical-data problems can cause:
- No test starts for the selected period.
- The backtest starts from a later date than expected.
- Modeling quality becomes poor.
- Results change after downloading or replacing history files.
Data check:
Open the chart for the target symbol and timeframe, scroll back to load history, and confirm that the period you want to test actually exists. If the available history is not enough, prepare a separate historical-data environment before trusting the result.
Open the chart for the target symbol and timeframe, scroll back to load history, and confirm that the period you want to test actually exists. If the available history is not enough, prepare a separate historical-data environment before trusting the result.
If the problem is related to historical data, there are two practical ways to continue:
- Prepare Dukascopy historical data manually and import it into MT4.
- Use Tickstory to prepare detailed tick data and export it for MT4.
Which should you use?
Dukascopy is useful when you want direct control over the historical-data import process. Tickstory provides a more integrated workflow for downloading tick data, exporting HST/FXT files, and using Advanced Tester. In our Tickstory test, MT4 reached 99.90% modeling quality.
Dukascopy is useful when you want direct control over the historical-data import process. Tickstory provides a more integrated workflow for downloading tick data, exporting HST/FXT files, and using Advanced Tester. In our Tickstory test, MT4 reached 99.90% modeling quality.
Spread, Tick Model and Test Settings
Even when the EA and historical data are correct, Strategy Tester settings can change the result or prevent trades from opening.
| Setting | Why It Matters |
|---|---|
| Model | For many EA tests, “Every tick” is more appropriate than open prices only, especially if the EA uses intrabar conditions. |
| Spread | If the spread is too wide, a spread filter may block every entry. |
| Use date | If the selected range has no data or is too short, the report may be empty. |
| Optimization | If optimization is enabled unintentionally, MT4 may run parameter passes instead of a normal single test. |
If the EA has a spread filter, print the current spread during testing. For 5-digit brokers, remember that points and pips are not the same.
EA Conditions That Never Trigger
A backtest with zero trades can still be a valid result: the EA may simply never see a market condition that satisfies all of its rules.
Typical blockers include:
- Indicator conditions that never align.
- Time filters that exclude the whole test period.
- Spread filters that are too strict.
- Lot size or margin filters that stop entries.
- One-position-only logic that never resets correctly.
- External files or global variables that are missing in the tester environment.
When debugging, do not print only the final entry result. Print each important condition separately so you can see which condition is blocking the trade.
Print("maCondition=", maCondition);
Print("timeCondition=", timeCondition);
Print("spreadCondition=", spreadCondition);
Print("lotCondition=", lotCondition);Optimization Does Not Start or Stops Unexpectedly
Optimization problems are slightly different from normal backtest problems. A single test may work, while optimization produces zero trades, skips many passes, or stops with initialization errors.
Check the following:
- Input parameter ranges are not too wide.
- Step values are not zero or invalid.
- Minimum values are lower than maximum values.
- The EA does not depend on chart objects that are unavailable in Strategy Tester.
OnInit()orinit()does not return an error for some parameter combinations.- External files are available inside the tester environment.
Optimization warning:
If many passes show zero trades, do not assume the EA is broken immediately. Reduce the parameter range first and run one normal backtest with a known valid setting.
If many passes show zero trades, do not assume the EA is broken immediately. Reduce the parameter range first and run one normal backtest with a known valid setting.
How to Check the Journal and Experts Tabs
One of the fastest ways to find the cause is to read the Strategy Tester logs. The Journal and Experts tabs often show why the test failed or why an order was not opened.
| Message Type | What It May Mean |
|---|---|
no history data | The selected test period does not have enough historical data. |
initialization failed | The EA failed during initialization, often because of invalid inputs or missing resources. |
| OrderSend error | The EA tried to trade, but the order request was rejected. |
| No order messages at all | The EA may never reach the entry block. |
If an OrderSend error appears, check the exact error number. Invalid price, invalid stops, invalid lot size, and insufficient margin all require different fixes.
When to Analyze Results with Quant Analyzer
Quant Analyzer is useful after you have a valid MT4 backtest report. Before using it, make sure the test actually ran, trades were generated, the date range is correct, and the result is not based on missing or unreliable data.
A practical workflow is:
- Fix Strategy Tester settings and historical-data problems.
- Confirm that the EA opens and closes trades as expected.
- Run the full backtest.
- Export the MT4 backtest report.
- Load the report into Quant Analyzer.
- Review weak hours, weak months, large losing trades, and drawdown concentration.
Before analysis:
Do not analyze an empty or invalid report. If Strategy Tester produced no trades or used unreliable history, fix that first. Quant Analyzer is for understanding a valid backtest result, not for repairing a broken test.
Do not analyze an empty or invalid report. If Strategy Tester produced no trades or used unreliable history, fix that first. Quant Analyzer is for understanding a valid backtest result, not for repairing a broken test.
Summary
- MT4 backtests often fail because of settings, historical data, EA conditions, or initialization errors.
- If there are no trades, check symbol, timeframe, date range, spread, and EA filters first.
- Missing historical data can cause empty, late-starting, or unreliable results.
- Dukascopy can be used for a manual external historical-data workflow.
- Tickstory provides another option for detailed tick-data testing and Advanced Tester.
- Optimization failures often come from invalid input ranges or initialization problems.
- The Journal and Experts tabs are among the fastest places to find the actual cause.
- Use Quant Analyzer only after you have a valid MT4 backtest report.
