Skip to content
Prev Next

EAs & Forward Testing

In this lesson we will examine:

– Preparing for forward testing
– Tracking your system and portfolio
– Improving your system

In the previous lesson we looked at backtesting EAs and analyzing the results. This is only the first part of the process, however – it is important to enter into a period of forward, or live, testing. This “live” testing doesn’t need to be conducted on a live account, and you can test on a demo account first instead. Indeed, testing on a demo account before putting real money on the line is highly recommended.

Forward Testing Your EA

Backtesting is a crucial step in developing a strategy. However, if you want to see if your backtest results are valid, or likely to provide an edge in future, it is vital to test your EA on the live markets in real time.

Many new traders will skip the live testing component once they have a good backtest result, and are shocked when their account balance starts declining.

There are many reasons to forward test, but the main benefit is to evaluate the correlation between backtesting, out-of-sample testing, Monte Carlo analysis,  and forward performance. The robust nature of the combination of these testing results is essential in determining the true viability of a trading system.

Step 1: Set Up Your Trading Environment

Tip: The information that follows in the rest of this lesson is applicable to both forward testing and when you finally decide to start live trading with real money.

The first thing to do is have your MetaTrader 4 demo account ready for testing.

If your EA trades 24/5 and you have an unreliable Internet connection, or for some reason don’t want to leave your computer on all the time when the markets are open, you may wish to consider renting a Virtual Private Server (VPS) for trading.

A VPS is a Windows operation system server that hosts your MT4 installation. You configure it remotely, and then it will run with almost 100% uptime in terms of Internet connectivity.

There are many companies that offer VPS services, including Virtual Hosting via MetaQuotes. The advantage of using the MetaQuotes version is that you don’t need any advanced knowledge to configure the VPS remotely – you can simply make a copy of the setup on your brokers MT4 installation on your computer and synchronize it with the Virtual Hosting account.

Please watch the video below for a guide to configuring Virtual Hosting:

Whether you decide to use a VPS or not, you will need to enable set up your EAs on the charts you wish to trade.

Open the charts for the instruments you want to trade, and ensure they are set to the time frames you backtested on.

Hold the “Ctrl” button on your keyboard and tap the “N” button to bring up the Navigator. Select the EA you want to use and drag it from the Navigator onto your chart.

The Expert Properties will now be shown.

To load the Expert Set (.set) file you saved from your backtest, click load:

Now, navigate to the “tester” folder. Your .set files will be in the “tester” folder by default:

Select the file you want and select “Open”. The parameters you gained from backtesting and optimization will now be loaded into your EA.

Now, we need to enable AutoTrading, or, “live” trading, for Expert Advisors. This simply means that Expert Advisors will be enabled to run on the account.

Select “Tools” from the top menu, then select “Options”:

From the Options box that now appears, select the Expert Advisors tab, and check the “Allow automated trading” box:

Allow DLL imports if your EA requires them and you trust the source of the EA.

Your EAs will now begin operating, and will start trading when the next signal occurs.

Tracking Your Results

In order to track the performance of your strategies, it is advisable to use a free monitoring tool. These are linked to your MT4 account, and display the trading information and results on a website.

There are several of these available, but the most popular is MyFXBook. Another, FX Blue, works in the same way, but has some more advanced analysis tools than MyFXBook. You could even use both, since both services are completely free of charge.

To set up an account on these websites, simply register via the links above. You can then download a publishing Expert Advisor. Connect these to different charts (you can only attach one EA to one chart at a time) and you can then view the trading performance online.

Below is an example of the web page you use to review your results:

Reviewing Your Results

Once you have about 100 trades, it is time analyze your results in MyFxBook and/or FX Blue and see if the system performance is consistent with your backtesting results. They won’t match exactly, but you can look for similarities in win/loss percentage, risk:reward ratio, maximal drawdown and average consecutive wins/losses.

You can also use the Monte Carlo simulation and other tools in QuantAnalyzer that we looked at in the last chapter to analyze your live testing.

Finally, you can also run a new backtest (without optimization) after a month of trading and compare it with the data from the live test. This will give an indication as to how reliable your backtesting is.