One backtesting aspect that might ruin a good strategy
However, one would assume that all aspects of the backtest are taken care of, and the EA owner will just need to run the stragegy and see its results…but is is not like that. One potentially harmful aspect is data quality.
If you are testing your EA with an MT4, MT5 broker, you are, most probably, using that broker’s historical data. In some cases, that broker might have incorrect prices on a certain instrument, on certain timeframes, and in certain time periods.
One example is shown below, for a backtest on an mt4 platform, with the 1 min timeframe and the backtesting option: every tick. This is the most precise backtesting method available on mt4 (and I chose 1 min time-frame because my strategy is built this way).
On the left side you can see the normal price behavior and expected EA actions taken but on the right side on the chart you can clearly see quick price spikes that clearly were not happening at that time and though, unexpected EA behavior.
If you are not backtesting with visual mode (which no one does, especially of you test longer time intervals) you will most probably, not see this issue in your testing. So you can get fake backtest results just because of this issue.
To be clear: this is your responsibility, the Broker is giving you the data as it is, they don’t have the clean data responsibility. Also, the backeterstar as a software is working with the data you feed it, so no blame on the mt4/mt5 backtester can be made here.
What can you do
- know your strategy well enough to see that something is wrong in the results and then dig deeper to find the issue and fix it
- make separate backtests, on different time intervals and see if there are any bug discrepancies between the results (however there are strategies that do have very different results, depending on the market context we are in – in these cases the historic data could be correct)
- use a different broker’s data if you think/see that a broker has incorrect data
- import data from a trusted source and use the mt4/mt5 backtesting capabilities (see below screenshot for mt4)
Building a good strategy is never easy. However, it would be best if you made sure that the building blocks are solid. Some of these are:
- starting from a good trading concept (something that makes sense in the markets)
- all trading scenarios should be covered by your trading rules (ex: when do you open a trade, when do you close a trade, etc)
- backtest your strategy (or the market will blow your account sooner or later)