Symptoms
Your backtest does not start - nothing happens when you click the Start button.
One of the following occurs:
- A message box pops up stating
No tick data symbol selected. - A message box pops up stating
No tick data for the selected symbol and range.
or
There is no tick data for the selected symbol and data source. - Your backtest journal (rightmost tab of the MT4 backtest pane) has a line that looks like this:
TestGenerator: no history data '<symbol><period>' from <date1> to <date2>
where date2 is in the past of date1
Cause
For #2, it's one of several possible issues:
- You enabled Use date and selected a To date that is equal to or precedes the From date.
- You enabled Use date and selected a date range that is not covered by the tick data you have available.
- If Use date was disabled and you see the second message mentioned in the Symptoms section, you have no data for the selected tick data symbol.
For #3, it is because you are backtesting an MQL market demo EA. The demo versions of these EAs are limited to backtesting up to a certain arbitrary date and unfortunately Metaquotes completely fails in making this clear.
You can easily test if this is the case by running a backtest of the MACD Sample EA on the same symbol, using the same configuration and tick data. If the MACD Sample EA is working fine but when you try to backtest the EA of your choice you get the no history data message, it's clear what the problem is.
Resolution
For #1, click the Tick data settings button to show the settings dialog. In the Basic tab, select the Symbol that you'd like the backtest to use tick data from:
For #2, if Use date is enabled check the From and To dates - the starting date must precede the ending date by at least one day.
If the number of total days displayed is 0, it means you don't have any data for the symbol. If the availability range is not what you expected, double check the Source and Symbol dropdowns to ensure that you selected the correct symbol and tick data source.
For #3, you need to check the state of your Use date checkbox and to check the available tick data.
The second date displayed in the error message is the limitation date for your EA. For example, if your backtest journal contains the message:
TestGenerator: no history data 'EURUSD60' from 2020.01.01 to 2019.06.01
it means the EA you are backtesting is limited to only backtest until 2019.06.01. We will refer to this as "the limit date" below.
If Use date is enabled, ensure that the From date precedes the limit date. Another alternative is to just disable Use date.
You also need to open the Tick data settings dialog and check the range of the available tick data (see the screenshot above).
If the earliest date available is not in the past of the limit date, you need to run the Tick Data Manager, click the ... button next to the symbol you're working with, head to the Download tab, configure the start and end date for the download so that you get the tick data that is necessary for your backtest and click the Start download button. In essence, you need to get tick data that precedes the limit date by as much as you would like to backtest.
Once the download is finished, click the Refresh button in the Basic tab of the Tick data settings dialog (illustrated in the screenshot above) and start your backtest once more.