Home » Blog » Platforms » MT4 » How to Do Back Testing or Backtesting of Your Strategy?

How to Do Back Testing or Backtesting of Your Strategy?

MT4 Strategy Tester

To get an effective trading system, you need to optimize and backtest your strategy by using MetaTrader’s Strategy Tester. Back testing or backtesting lets you simulate trading over a particular time frame in a few minutes. And with the optimize characteristic, one can find out which settings carried out very best over a particular historical chart.

What is back testing?

Backtesting is the process by which we check the performance of the trading system as happened in the past. We try to get trade to trade reports and try to figure out whether a trading system is profitable or not. We can use various tools for backtesting. Like we can backtest on Metatrader or on AmiBroker as the case may be.

Back testing tools

Backtesting on MetaTrader of MT4

There may be a debate on the accuracy of MetaTrader’s strategy tester. Mainly, back testing deals with a detailed approximation of how trades can be carried out in actual-time. However, it’s the one device on hand to swiftly take a look at any strategy over a variety of trading eventualities. Thus you get a trading system that you simply must learn to use smartly.

In the MetaTrader or MT4 you already have the benefit of using a demo account before trying on real money. Despite the fact, you may want to backtest any FOREX Robot! Say, you want to do back testing of the WallStreet FOREX Robot or Forex Black Magic Robot.

First, you must obtain historical data from the MetaTrader history center. Click on Instruments -> History Centre, or press the “F2” key of the keyboard. Within the checklist, to find the currency pair that you simply need to again-check and double click on to amplify it. Click on “1 Minute (M1)” after which click on “Download”. When the downloading process is completed, double-click on “5 Minutes (M5)” and “15 Minutes (M15)” to download for these time frames too. Close the “History Center” window.

Download Historical Data for Backtesting

To open the “Strategy Tester” window click the “Strategy Tester” button of the MetaTrader menu, or press “Ctrl+R” on the keyboard. In the “Strategy Tester” window, chose your forex robot-like “MACD Sample” as shown here or any other robot you want to backtest. Then chose one of the supported currency pairs (EURUSD or GBPUSD). Now chose the M15 timeframe or your desired timeframe. Next chose the method “Every tick …”, as shown below. Click “Start” to start the back testing.

Back Testing MetraTrader Strategy Tester

The backtest with “Every tick” is generally the most exact, however, it is rather gradual. In case you want to test on lower time frame then you can run the backtest on the M1 timeframe.

Important things to know while back testing on MT4

If you’re doing a backtest take a look at the most profitable time frame that you got from the results. Once you start live forex trading, you can use that time frame on the chart in live trading mode. However, for lower configuration computers, back testing process may overload your MetaTrader4 terminal and could lead to a MetaTrader 4 terminal crash.

Backtesting on AmiBroker

Just like MT4 backtesting can be done on the AmiBroker platform too. For that, first, you need to choose a trading system. Suppose we have selected the Connors RSI Trading System.

We will open the New Analysis window. Select the formula and select the stocks we want to backtest. Here we are back testing all the future and options stocks. So we will create a filter and select the stocks from a pre-defined watchlist.

Backtesting in AmiBroker

Next, we will select the time frame we want to test. Here, I selected the daily time frame. We will also select the capital we want to test. We will select the backtesting period. Here I have kept All Quotes to test all the data present. Now we will click on the Backtest button. This will test the entire data and produce us with the result.

Backtesting in AmiBroker

We have seen that Rs. 1 lakh has grown to over Rs. 13 lakhs over this period. We will also get the percentage of winners, here 78.76%. We will get the annual return and also risk-adjusted return. Watch the image below to understand the back testing process in AmiBroker.

Back Testing Report

Suggested reading and conclusion

As suggested reading, I will recommend the following book: Finding #1 Stocks: Screening, Backtesting and Time-Proven Strategies (The Zacks Series).

In conclusion, we can say backtesting is an important subject for traders. A trading system must be tested thoroughly on the past data before we use it for live trading. If it works well in the test result then only we can use a system on live markets. Many trading software are having a backtesting feature. We have already covered how to backtest on MT4 and AmiBroker in this article.

0 0 votes
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments