Backtesting Trading Strategies Mt4

  1. Backtesting Trading Strategies Mt4 Free
  2. Backtesting Trading Strategies Mt4 Download
  3. Backtesting In Mt4
  • Backtesting of automated trading strategies (Expert Advisors) is done in the MT4 Strategy Tester window. You can open it from the top menu (View - Strategy Tester) or by pressing CTRL+R. STEP 4.2 Check if Tick Data Suite 2 is loaded.
  • How to backtest a trading strategy using Tradingview, MetaTrader4 or any other Forex trading platform.Sign up for TradingView and get up to a $30 bonus by us.
  • The great part about MetaTrader 4 is that you can create automated trading strategies called Expert Advisors (EAs) and backtest them in the built-in Strategy Tester. If a strategy works well after thorough testing, the next step is to start testing it in a demo account to see if it works in real-time market conditions.

Another option is to learn how to backtest a trading strategy in MT4 (MetaTrader 4) or MT5 (MetaTrader 5), a popular trading and backtesting platform that can be downloaded for free from Admiral Markets UK Ltd. This method is very popular among automated traders.

One of the greatest features in MetaTrader platform is the possibility to backtest an expert advisor or an indicator. This is also one of the reasons why MetaTrader 4 is so popular. In this guide, you will learn what the meaning of backtesting is and how to backtest your strategies and expert advisors in MetaTrader 4 (MT4) Strategy Tester.

What Is Backtest in MetaTrader 4?

What does backtesting mean? A backtest of an expert advisor means running the expert advisor on historical data. Basically, you can see how the expert advisor would have behaved in the past. If properly done, backtesting can give you a good idea of the potential performance of an expert advisor.

When talking about backtesting, it is always important to remember that past performance does not guarantee future results. We can expand it a little to make it easier to understand: assume that you backtest an expert advisor and it is absolutely amazing — it has a gain of over 100% in 1 year and a drawdown of only 1%; this is just the backtest and it does not mean that the next year it will do the same — it could actually lose money, so always remember, for every trading strategy and expert advisor, what it did in the past does not indicate what it will do in the future.

Advantages of Backtesting

Backtesting an expert advisor brings many benefits, some of them are:

  • Testing the potential of a strategy — this is maybe the most important benefit. You may have an idea for a trading strategy, but testing it manually would take too much time. If you can develop an expert advisor that trades your strategy, you can backtest it on various timeframes, various instruments, and various market conditions (trending, ranging. and so on) and see if the strategy has any potential.
  • Find errors in your expert advisor — it doesn't matter how good a coder someone is, we all make errors when coding. Running a backtest of an expert advisor will allow you to spot bugs and correct them before running it on a demo account. Running a test on 1 year worth of data in a few seconds is much faster than actually waiting a year to verify it in trading account.
  • Gather more information about the possible results — it is true that past results do not guarantee future outcomes, but running a backtest can give you useful statistics about the possible results of an expert advisor. For example, you can get total profit/loss, number of trades executed, percentage of trades won and lost, drawdown, and many other metrics for the period you test it on.
  • Detect weaknesses in the strategy for possible improvement — backtesting can indeed show you when orders are opened and closed and you can adjust your strategy to improve the entry and exit triggers.
  • Test a product that you bought — if you buy a commercial EA or download a free one from some website, always backtest it first!
Backtesting Trading Strategies Mt4

Disadvantages of Backtesting

Backtesting unfortunately has some disadvantages:

  • Behavior on a real account may differ from backtesting — this is due to the broker's execution quality and the real-time communication with the server.
  • As already mentioned past performance does not guarantee future results — so, you should always take the results obtained from backtesting with some doubt. Generally speaking, an expert advisor performing poorly during backtesting hardly will perform well on a real account, while an expert advisor performing well on backtesting can have some possibility of successful trading in real conditions.
  • Backtesting requires quality raw data — we will talk more about this further, but for now, we can just say that backtesting can be reliable only if run on accurate raw data, usually tick data.

Backtesting Trading Strategies Mt4 Free

How to Backtest in MT4?

Backtesting is a very simple process. Open the Strategy Tester in MetaTrader 4 (Ctrl+R), select the expert advisor to test from the drop-down list, select the currency pair and timeframe, select the dates of start and end, set the input parameters for the expert advisor, and press Start button. MetaTrader will run the expert advisor on the historical data and present the results.

Historical Data

It is important to have accurate and complete historical data, otherwise the backtest will not be reliable. You can learn more about getting high quality historical data for accurate backtesting with MetaTrader 4 from our dedicated tutorial on MetaTrader historical data.

Conclusion

Backtesting means testing a trading strategy or an expert advisor on historical data. MetaTrader 4 provides a very simple and fast way to do it automatically via the Strategy Tester. Make sure to test your strategy before running it on a demo or real account. Also, make sure to use quality historical data or your results will not be reliable.


If you want to get news of the most recent updates to our guides or anything else related to Forex trading, you can subscribe to our monthly newsletter.

If you’re into automatic Forex trading via Expert Advisors (EAs), that’s great! There are some advantages to building EAs to trade, like eliminating human error and being able to run years of backtesting in a couple of hours.

EAs have their limitations, though. For instance, choosing good support and resistance levels to take your trading setups from is a pretty subjective process. How are you going to program an EA to only take trades from good support/resistance levels? Sometimes manual backtesting is the way to go.

When it comes to manual backtesting, you have some different options. You can use a backtesting software, like Forex Tester, to help you keep track of your performance, and also to allow you to factor in the spread, broker rules, etc…. While that is a great training tool, and a faster process for those who can afford it, today I’m going to show you how to manually backtest a trading strategy in Metatrader 4 (MT4).

How to Manually Backtest a Trading Strategy in Metatrader 4 (MT4)

If you’re using a new installation of MT4, you may not have enough data to work with on your longer time periods, i.e., Daily, Weekly, and Monthly. If you need more chart history to work with, open your “History Center” (F2) and download or import the required data for your currency pair.

Note: You can save time and hard drive space by only downloading the data that you need. For instance, if you are only going to be backtesting your trading system on the Daily charts, there is no point in downloading 1 Minute (M1) data.

Next, you need to rewind your chart history in MT4, so make sure the green auto scroll button is not engaged (see the image below). Rewind the chart history by dragging with your mouse or using your ← arrow key.

Note: To start manually backtesting, you need to know a few, useful Metatrader 4 hotkeys. Mainly, F12 moves the chart forward by 1 candlestick at a time. To move the chart backward by 1 candlestick at a time, hit Shift+F12.

Backtesting Trading Strategies Mt4 Download

Once you’ve gone backward far enough in your chart history, simply hit F12 until a setup appears that meets the requirements the trading strategy that you are testing. In the example below, I used a morning star candlestick pattern as my entry signal.

When manually backtesting a new trading strategy in MT4, some traders plot out their entry, stop loss, and take profit levels at each trading setup (like I did in the image above). However, this can be tedious – especially if you plan to take a hundred or more backtesting trades.

price action faster way to backtest is to skip plotting or measuring anything at all unless you need to. Stick to your rules. If the price goes straight to your stop loss, then you obviously count that as a loss. If goes directly to your take profit, then you count that as a win.

Backtesting In Mt4

When the trade result is obvious, nothing else needs to be done. When the result is not so obvious, you can simply measure using the crosshair in MT4 (click the mouse wheel or Ctrl+F).

In the image above, you can see the same trade setup as before. This time, I simply measured the pips from my entry to my stop loss and then doubled that to get my take profit.

In either example, it’s easy to see that my trade did not quite hit a full take profit. However, by only measuring with the crosshair, I was able to determine the result much faster and move on to the next trade.

Putting Your New Manual Backtesting Skills to Good Use

I suggest doing a couple hundred backtesting trades, for each new strategy, using these techniques. Determine your risk and write down the results of each trade, e.g., -2%, +4%, BE, etc…. To get an accurate representation of your trading strategy’s profitability, you need to do the math on a hypothetical trading account as well.

Example: Starting with a hypothetical trading account of $1,000, a 2% loss brings the account to $980. After a 4% gain, the account is up to $1,019.2. The next trade was stopped out at break even (BE), resulting in no change.

It’s important to track your profit and loss on each currency pair separately because most trading strategies experience, at least, some variance in performance between pairs. Many perform extremely well on certain pairs and extremely poorly on others.

Some of these techniques may seem obvious to you but learning how to manually backtest a trading strategy in Metatrader 4 (MT4) can save you a lot of time and money down the road. Although tedious at times, going through these steps, thoroughly, will help you weed out the losing strategies, and build up your confidence in the winning strategies.

Still looking for a profitable trading system? I've tested 10+ systems. Only 3 were profitable! Learn more about my #1 recommended trading system, Day Trading Forex Live.