MT4 Manual Backtesting Full Guide (with useful tips and indicators)

MT4 Manual Backtesting Full Guide (with useful tips and indicators)
Share on facebook
Share on twitter
Share on linkedin
Share on email
Share on whatsapp

Backtesting is a key part of any strategy development. In this guide we will show you how to conduct a proper manual backtest in MT4 and record and evaluate your results. We will also highlight some options that may be useful when backtesting a strategy including free MT4 indicators to help you.

How to backtest a strategy manually

  • Download chart history (if required)
  • Turn off autoscroll
  • Make use of the F12 hotkey
  • Use indicators to make visualisation easier
  • Keep screenshot records
  • Keep a backtesting spreadsheet and work out your key metrics: Win/Loss Ratio, Achieved Risk to Reward Ratio
  • Review and refine your rulesets using spreadsheet filters
  • Link your account to a date service for more insights
  • Work out and review your key performance metrics: Win/Loss Ratio, Achieved Risk to Reward and Combined Ratio

How you backtest will really depend on what you are testing. Strategies based on indicators and EAs can be tested with the automated tester.

However many strategies will be difficult to test with software as your entries and exits may change depending on the market structure of that day and news events or if you have specific rules around risk management (ie moving stops and targets, partial closes, etc).

The more rules you have for a strategy the more likely it is that you will need to test it manually. Caution should also be used if trying to auto test time based strategies (like opening balance strategies) as broker time data may change throughout the year as the clocks move backward and forward.

Download Chart History

Before starting either a manual or automated testing in MT4 it is worth checking that you have enough chart history (price tick data) as far back as you want to test. There are two steps to achieving this:

Note: This process is best done on a demo account.

First update your chart options. Go to the top menu and Select Tools > Options or use the Ctrl+O shortcut to bring up the options menu. Select the Charts tab and change the Max Bars In History and Max Bars in Chart to 9999999999999 and click ok.

Update Your Chart Options Example
Update Your Chart Options Example

This will max out the amount of history you can import. Now close and reopen MT4. Once MT4 has restarted, open the History Centre by clicking F2 or Select Tools > History Center.

Go to the currency Pair you want to download data from. Double click all the time frames until they are all colored like on the picture below. Then click on Download and then OK. The download may take a few minutes.

Download Chart History Example
Download Chart History Example

How To Manually Backtest in MT4

Manual backtesting in MT4 is a fairly simple process and in its most basic form only requires three things:

  • Turning off Autoscroll
  • Go to back to the date you want to start your backtest
  • Use the F12 Hotkey to scroll through the chart

But record keeping is also very important so we will also cover taking screenshots, keeping a backtesting spreadsheet and analysing your results.

How to scroll MT4 charts one bar at a time for backtesting

  • Turn off auto scroll and chart shift. Turning off auto scroll stops the chart from jumping back to the most recent price
  • Go to the date you want to backtest
  • Use the F12 button to move forward one bar at a time. (hold F12 for continuous scroll)
  • Use Shift+F12 to go back one bar at a time (Hold Shift+F12 for continuous scroll)

Hint: You can quickly go to any date by hitting the Enter key and using the MT4 search box on the bottom left of the screen. Read more about how to do this in our MT4 Chart Setup Guide article.

How To Make Manual Backtesting Easier

We have found that one of the best ways to make manual backtesting easier is to use some simple MT4 custom indicator to help you focus on the time period you are looking at.

Let’s take a look at the example below where we are testing an Opening Range Breakout Strategy for EUR/GBP (also known as an Initial Balance Strategy).

By making use of our Trading Time Zones indicator we have clearly highlighted the time period that we are focused on (in blue on the chart). This makes it easier to focus and also helps us skip more quickly between trading sessions and ignore the out of hours trading.

We have a range of indicators that are useful for backtesting. In the chart example you can see we have also used a Risk to Reward indicator to map out potential targets as well as an initial balance indicator.

Take Screenshots For Every Trade / Trading Day

This is an extremely useful habit to get into when backtesting. One of the great things about backtesting is that it really gets your mind working on how that particular market moves and reacts which will help you generate ideas on how to improve and perfect your strategy.

By keeping a picture record, you can quickly go back and review your idea by scanning through the previous pictures.

How To Take Chart Screenshots In MT4?

To take a screenshot in MT4, click File > Save as Picture. This will bring up an option box which will allow you to save either the chart or the whole workspace as an image.

How To Take Screenshots In MT4 Example 1
How To Take Screenshots In MT4 Example 1

If you have an MQL5 account you can also save the picture online with a link if you wish to share it with others.

How to take screenshots in MT4 2
How to take screenshots in MT4 2

Keep A Backtesting Spreadsheet

This is a crucial part of the process. You need to keep good, honest and accurate records of your backtesting in order to truly evaluate your performance over time before you implement the strategy on a live account.

What information do I need to record in a backtesting spreadsheet?

There are many things that you can record in a spreadsheet but we recommend that you capture the following information as a minimum for any strategy:

  • Market
  • Date, day and time of trade
  • Buy or Sell
  • Number of lots
  • Entry price
  • Stop and target levels
  • Result (win/loss/breakeven)
  • Financial result in currency (how much you won or loss)

In addition to the above you may want to keep some additional information such as news events related to your market. Depending on your strategy you may also want to record other information such as what the underlying market trend is on the time frame you are testing or higher time frames.

Hint – We have several Pro MT4 indicators for identifying whether the market is in an uptrend or downtrend by using various moving averages.

Refining Your Results With Filters

This is a great tip for helping you find ways to improve your performance. For example you could filter out days of key news events to see how that changes your results or review your performance on buy orders and sell order individually.

It may be that these simple tests could instantly improve your results. For example we have found that index trading highly favours buys over sells for our own strategies.

Another tip is to check days of the week, we have surprisingly found that on a few strategies we could remove Fridays and actually have better results which is a win win by improving results and having a long weekend!

Link Your MT4 Account To A Data Service To Get More Stats

My is a popular platform where you can link to your MT4 account with your investor password.

By doing this you will be able to:

  • Analyse your trades
  • Build trading portfolios
  • Create a verified track record of your trades
  • Provide charts and statistics on your trading performance

The platform will allow you to share a private invite link to any potential investor and with a verified account they can track and review your trading performance.

You can also publish your profile publicly if you are looking to promote yourself more widely and this can be tracked on the MyFXBook website or you can embed a link or chart with your performance into any website of your choice.

Hint: to verify your trading performance in MyFXBook you can link it with your investor password. To learn more about the investor password see our article here.

Understanding The Key Backtesting Ratios

With the above data you will over time be able to work out the key metrics to understand if the strategy is successful which are:

  • Win to Loss Ratio. The number of winning trades divided by the number of losing trades. Obviously the higher the better but a number greater than 1 indicates that you win more than you lose.
  • Some people prefer to use a Win Ratio % which is the number of winning trades divided by the total number of trades. A number higher than 50% shows that you win more than you lose.
  • Achieved Risk to Reward Ratio. This is not what you targeted as a risk to reward ratio but what you actually achieved – so your average win amount divided by your average loss amount. Again the higher the better but a number higher than 1 indicates that you are achieving greater than 1:1 risk to reward.

Depending on your trading style either of these may actually be negative but you can still be profitable overall. For example you could have a negative Win to Loss Ratio and a very high Achieved Risk to Reward Ratio and the combination will make you profitable.

As such most people will combine the two into a final metric to show profitability. We use a Combined Ratio which is just the Win to Loss multiplied by the Achieved Risk to Reward. A number above 1 is profitable overall.

Read More About MT4 Platform

Justina Nothard

Justina Nothard

Hi, I’m Justina Nothard, a retail investor trading Stock Index Futures.

I understand how hard it can be for the ordinary trader to learn the basics and find useful tools and practical information.

This is why I decided to create Nothard Trading to help you take control of your trading.

Scroll to Top