- MT4 Strategy tester problem
- Development plans for the MetaTrader 5 Strategy Tester
- Discrepancy in Strategy Tester Spread for EURUSD on M1
I collected three months of historical data in Excel and recorded 127 trades based on my strategy. However, the Strategy Tester only executed 105 trades. After reviewing the trade history visually on the chart, I identified a bug where certain positions fail to open. The EA log shows a “Market Closed” message, even though the market is clearly open. My strategy uses consistent entry signals around the same time each day, so this discrepancy was easy to detect. Although the strategy performs well in live trading, this issue has shaken my confidence in the backtest results. I'm unsure whether the problem lies with the EA itself or with the Strategy Tester.
The Strategy Tester sporadically fails to open positions during active market hours and does not consistently respect pre-set TP and SL orders on the chart. This issue occurs only during backtesting — not in live trading. I trade index CFDs, which operate nearly 24/5, and all tests were conducted during confirmed market hours. I can send evidences.
to help in troubleshoot, post all evidences, if possible post ea, and symbol name and broker name
I checked the trading hours for the instruments on the broker's website, and everything is within the expected parameters.
I also ran the test shown in the image to demonstrate this issue.
My broker is Exness, which uses GMT+0 year-round, while my local timezone is UTC-3.
Just a note—I only noticed the omission during the tests conducted on Friday (2025/04/18) and today (2025/04/21), both of which are public holidays in Germany.
Could this be the cause of the issue? Perhaps we should consider running tests only during non-holiday weeks to confirm.



- 2025.04.14
- get.exness.help
I always check for that error Market is Closed. If i get the error, then, the ea is instructed to skip that hour or session; unless it is on 0 hour, in which case the ea waits 3 minutes, rechecks signal conditions and resends the new order.
I always get the 'Market is Closed' error—are you saying that’s actually an error? In your case, is it really an issue or just the market being closed?
You mentioned the EA skips that hour or session unless it’s set to 0—doesn’t that basically mean the same as skipping due to the error?
In my case, entry and exit signals are super precise, so even missing it by 3 minutes throws everything off and could mess up the whole strategy. What instrument are you getting that error on?
I always get the 'Market is Closed' error—are you saying that’s actually an error? In your case, is it really an issue or just the market being closed?
esactly what it says. that specific market is closed. ie the market on that specific symbol is closed.
You mentioned the EA skips that hour or session unless it’s set to 0—doesn’t that basically mean the same as skipping due to the error?
i coded it so that it skips the short period when trading is closed between 23:57 - 00:03.
The ea has been coded to check the signal conditions again when trading is allowed again.
In my case, entry and exit signals are super precise, so even missing it by 3 minutes throws everything off and could mess up the whole strategy. What instrument are you getting that error on?
there is always another signal in the future.
I get it on any market that is closed. For example gold when it is closed for 2 hours (every day) when trading is not allowed, or in strategy tester, on Public Holidays that the Broker is not trading, strategy tester will still attempt to open a trade on that Public Holiday that the broker is closed.
I always get the 'Market is Closed' error—are you saying that’s actually an error? In your case, is it really an issue or just the market being closed?
Yes, it is an error. of course it is an error. It is a broker/"server error". Look up the error code on this site. exactly what the error description says -- "Market is Closed". It could be a public holiday or if the symbol is an indice, maybe the broker is not trading it at the time due to stock market being closed. Not all stock markets are traded 24/5.5. And as i said above, Gold on my broker is not traded for 2 hours every day due to broker restriction, but gives the same error. I get price quotes on the charts, but i can not open or close GOLD trades and get that error if i try to modify open GOLD trades during that 2 hour period.
Hi Thiago,
this kind of issue is actually quite common when comparing live trading with Strategy Tester results. The “Market Closed” message in the tester can happen for several reasons even if it looks like the market should be open. Here are a few points you could check:
-
Check the historical data quality in the tester. Missing or incomplete ticks for specific times can cause the tester to believe the market is closed. Try re-downloading the historical data from your broker.
-
Verify the trading hours and session times defined in your EA. Some EAs have filters for trading sessions, and these can behave differently in the tester if the time settings or broker symbols are not aligned perfectly with your live account.
-
Review the spread settings in the tester. If the spread is set too high or varies from your live environment, some trades might not trigger as expected.
-
Test with “Every Tick” mode in the Strategy Tester instead of “Open Prices Only” or “Control Points,” as this can influence the trade logic timing.
-
Double-check if there are day-of-week or holiday filters active in your EA code that might block trades on certain days in the tester environment.
If the problem still exists after checking these points, I recommend testing on another broker’s historical data or running a forward test on a demo account to compare behavior.
esactly what it says. that specific market is closed. ie the market on that specific symbol is closed.
i coded it so that it skips the short period when trading is closed between 23:57 - 00:03.
The ea has been coded to check the signal conditions again when trading is allowed again.
there is always another signal in the future.
I get it on any market that is closed. For example gold when it is closed for 2 hours (every day) when trading is not allowed, or in strategy tester, on Public Holidays that the Broker is not trading, strategy tester will still attempt to open a trade on that Public Holiday that the broker is closed.
Yes, it is an error. of course it is an error. It is a broker/"server error". Look up the error code on this site. exactly what the error description says -- "Market is Closed". It could be a public holiday or if the symbol is an indice, maybe the broker is not trading it at the time due to stock market being closed. Not all stock markets are traded 24/5.5. And as i said above, Gold on my broker is not traded for 2 hours every day due to broker restriction, but gives the same error. I get price quotes on the charts, but i can not open or close GOLD trades and get that error if i try to modify open GOLD trades during that 2 hour period.
-
I understand your point; however, I ran the test in March 2025 using the same period and configuration, and there were no “Market Closed” errors at that time.
-
This week, though, while running the exact same test setup, those errors have appeared. Upon careful review of the details I've previously shared, it's clear the dates in question are not holidays, nor do they fall within any defined daily break intervals — they are regular Fridays during normal trading hours.
-
The occurrence of these errors under such conditions seems inconsistent. Please note that the error timestamps are in the UTC+0 time zone.
TEST RUN IN MARCH
TEST EXACT SAME SETUP RUN IN APRIL (ATTENTION TO "ENTRIES BY WEEKDAYS AND TOTAL TRADES)
Hi Thiago,
this kind of issue is actually quite common when comparing live trading with Strategy Tester results. The “Market Closed” message in the tester can happen for several reasons even if it looks like the market should be open. Here are a few points you could check:
-
Check the historical data quality in the tester. Missing or incomplete ticks for specific times can cause the tester to believe the market is closed. Try re-downloading the historical data from your broker.
-
Verify the trading hours and session times defined in your EA. Some EAs have filters for trading sessions, and these can behave differently in the tester if the time settings or broker symbols are not aligned perfectly with your live account.
-
Review the spread settings in the tester. If the spread is set too high or varies from your live environment, some trades might not trigger as expected.
-
Test with “Every Tick” mode in the Strategy Tester instead of “Open Prices Only” or “Control Points,” as this can influence the trade logic timing.
-
Double-check if there are day-of-week or holiday filters active in your EA code that might block trades on certain days in the tester environment.
If the problem still exists after checking these points, I recommend testing on another broker’s historical data or running a forward test on a demo account to compare behavior.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use