It can be frustrating to run a backtest in MetaTrader 4 Strategy Tester and have it stop immediately with no trades.
This has happened to me many times and I had to figure out what was going wrong. So in this tutorial, I'll show you why this happens and what you can do to troubleshoot each cause.
MetaTrader 4 Strategy Tester will not show any trades for one of the following reasons:
- The settings are incorrect
- It's not a good market to use that EA with
- There were no valid setups
- The coding logic is faulty
- The strategy doesn't work on the timeframe you're backtesting on
- The EA isn't fully automated or doesn't execute trades
- The EA is made for MT5
Now I'll get into the details of each scenario and what you can possibly do to fix each problem.
If that doesn't work, then I'll give you one final thing that you can do that is guaranteed to give you an answer to your issue.
How to Properly Setup an Automated Backtest in MT4
First, be sure that you're following the correct procedure for setting up a backtest in MT4 Strategy Tester.
The EA has to be in your MT4 experts folder so the platform can use it in a backtest. Once the file is in there, restart MT4 so Strategy Tester has access to it.
If you want to get a complete tutorial on how to run your first backtest in the MT4 Strategy Tester, read this tutorial.
This tutorial is about how to troubleshoot issues. So after you know how to set things up, come back here if you're running into any roadblocks.
Alright, let's get into it…
The Settings are Wrong
The most common reason why a backtest doesn't work is because the settings in the EA are not set correctly.
Many times, this is an oversight of the developer. If a developer doesn't put in the best EA settings as the default, then this can lead to a lot of confusion.
So double check with the developer what the best settings for the EA are.
They will usually be available on the website where you downloaded the EA.
Then click the Expert Properties button in the Strategy Tester to change the settings of the EAs.
Backtesting in the Wrong Market
Not all trading strategies will work in all markets.
In fact, there's a good chance that a strategy won't work in multiple markets.
Some strategies only work in stocks. Others will only work on crypto.
So you have to understand which market the strategy was designed for and only use it in that market.
For example, this trading strategy only works with one Forex pair. If you use it with other pairs, you'll lose money.
Many people who are new to trading are under the impression that a trading strategy should work well in all markets.
Trading doesn't work like that.
Thinking that a strategy will work in all markets is like saying that since a V8 engine works well in a Ford F150 truck, it should work well on a Ducati Superleggera motorcycle too.
Now, you can (and probably should) test the strategy in multiple markets.
You never know, it might work.
But don't be surprised if it doesn't.
No Valid Trade Setups
Everything could be setup properly in the EA, but maybe there are just no trades.
This doesn't happen often, but it can.
It's more likely that the logic or settings of the EA are not correct.
But if you don't get any trades, try running a backtest on another Forex pair, or on another timeframe.
If you get trades on another pair or timeframe, then it could be that there were simply no trades.
Also check to see if you have downloaded all of the available historical data for that market.
You might only have a few months of data and that's why your test is ending so quickly.
The Logic of the EA is Broken
In some cases, the coding of the EA simply doesn't work.
The developer may have missed an important piece of code or they didn't test the EA properly.
This happens a lot with EAs in the MT4 Code Base. Many of them are half-baked.
So if you aren't getting any trades when you run a Strategy Tester backtest, then see if you can find out how the EA works and why it might not be executing trades.
Many times automated backtesting makes it hard to see what is going wrong. That's why in most cases, I highly recommend starting with manual or partially automated backtesting first.
Then when you find something that works, you can turn that into a fully automated system.
If you want to get into manual or partially automated backtesting, I recommend using NakedMarkets.
Backtesting on the Wrong Timeframe
Some trading strategies won't work on higher or lower timeframes because of how they are built.
For example, let's say that you created a trading strategy that only enters trades on the open of the London Session.
If you try to use that strategy on the daily chart, it probably won't execute trades because the daily candles don't close at the right time of day.
On the other end of the spectrum, if you use a daily chart trading strategy on the 1-hour chart, it may trade too frequently and the spread will probably take a large chunk out of your profits.
So make sure that you know how your EA works and if it's meant to be used on a specific chart timeframe.
The EA Isn't Fully Automated or Doesn't Execute Trades
There are some EAs that only handle entries or only handle exits.
The don't do both.
Other EAs only provide information, they don't execute any trades.
I've also seen EAs that require input from the user during the backtesting process.
I actually prefer EAs that aren't fully automated. In my opinion, it's best if an EA handles the entry or exit, but not both.
You can find our MT4 trade management and informational EAs here.
So be sure that the EA you want to backtest is actually built to execute trades.
Some are not.
The EA is Made for MT5
Finally, if you're trying to use a MT5 EA in MT4, it won't work.
MT5 uses a totally different programming language.
I know how it is though. It's easy to download a bunch of EAs from the internet and forget which platform they are for.
In order to figure out which EAs work with MT4, look at the file type. MT4 files will end with .mq4 or .ex4.
If your file has .mq5 or .ex5 at the end, it's for MT5 and won't work in MT4.
The Best Solution for No Trades in MT4 Strategy Tester
If none of the solutions above work for you, then the best thing to do in ALL situations is to contact the developer of the Expert Adviser (EA).
They will usually know why you are not getting trades and can help you understand their EA better.
I gave you a few ideas on why a strategy may not be working, but the reality is that I don't know how every single EA works.
The only person who knows that is the developer.
So again, if you're still having problems after trying all of the above, then contact the creator of the EA.
Conclusion
So those are some reasons why your MetaTrader 4 Strategy Tester backtest may not be showing any trades.
It can be very frustrating to run a test and have it stop immediately.
But now that you know why this happens and what to do, you'll never get stuck again.