Trading

The Ultimate Guide to MT4 Backtesting

  • 4

    Running 99% modelling quality Every Tick backtest with real spread

    Now you are ready to run "Every Tick" MT4 backtests with real spread incorporated and reach 99% modelling quality. Having real historical spread in your backtesting process makes your strategy test more precise.

STEP 4.1
Open MT4 Strategy Tester

MT4 Strategy Tester can be accessed from the top VIEW menu

MT4 Strategy Tester can be accessed from the top VIEW menu

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 pressingCTRL+R .

STEP 4.2
Check if Tick Data Suite 2 is loaded

Tick Data Suite menu and settings integrated into MT4 platform

Tick Data Suite menu and settings integrated into MT4 platform

Before you run backtest Forex trading strategies (EA) you should check if Tick Data Suite 2 is loaded with your MT4 platform.

If TDS2 is loaded you will see a button " Tick data settings " and a checkbox " Use tick data " in the MT4 Strategy Tester. You might need to resize your MT4 window to make it wide enough for those options to appear.

Also, if TDS2 is loaded, then you should see additional menu options in theAboutmenu section of the MT4 terminal.

STEP 4.3
Enable variable Spread and set other TDS2 settings

MT4 Strategy Tester is set to use Tick Data and variable Spread during backtest

MT4 Strategy Tester is set to use Tick Data and variable Spread during backtest

To configureTick Data Suite 2and choose how you want backtest to be performed you need to open TDS2 settings window by clicking the " Tick data settings " button.

In this example I enable variable Spread and click OK. You can see " Variable " is set the Spread value in theMT4 Strategy Tester .

STEP 4.4
Select Expert Advisor (EA) you want to backtest

Select Expert Advisor and set its properties

Select Expert Advisor and set its properties

Choose which Expert Advisor you want to test and click " Expert Properties " to set your desired parameters.

In the " Testing " tab enter initial deposit amount, choose currency and make sure " Long & Short " positions are selected to allow both, BUY and SELL operations.

STEP 4.5
Set your desired Expert Advisor (EA) inputs

Set Expert Advisor inputs (settings)

Set

Expert Advisor inputs (settings)

Most of the Expert Advisors have at least few parameters you can set. In the " Inputs " tab you can set them the way you want for this particular test.

You will find all variables (settings) listed in the Inputs tab. Simply enter/set desired value for any parameter in theValuecolumn. If you want to reset to default settings click theRESETbutton.

Ignore columnsStart, Step, Stop . You do not need them now, because they are for EA optimization and not used during a backtest.

STEP 4.6
Select instrument, time frame and modelling type

Select symbol, time frame and modelling type in MT4 Strategy Tester

Select symbol, time frame and modelling type in MT4 Strategy Tester

Next step is to select currency pair (Symbol) and its time frame. Then you need to select " Every Tick " as your modelling type.

It has no effect if you change the Spread here.  Tick Data Suite 2will override this setting and use real variable Spread, because I have set it that way in the previous step.

STEP 4.7
Set the date range

Set the date range for backtest in the MT4 Strategy Tester

Set the date range for backtest in the MT4 Strategy Tester

Strategy Tester allows you to select date range for the test. If it's not selected, like in this example, backtest will be performed on all available history price data.

But if you need to test the strategy only during specific date range you can easily do that.

When you done setting parameters click " Start " to begin the test. It might take a while depending on how long the date range is, EA algorithm and your computer power.

STEP 4.8
Check backtest report

Backtest results graph shows 99% modelling quality

Backtest results graph shows 99% modelling quality

After backtest is finished you can see the results. In this equity chart we see modelling type and quality is printed, which was " Every Tick " with 99% quality.

Results of a 99% modelling quality backtest report with variable spread

Results of a 99% modelling quality backtest report with variable spread

In the " Report " section you can see more results of the backtest including the modelling quality number as well.

Additionally you can find full trade list generated during the test in the " Results " tab. To find if there were any errors see the " Journal ".

To restart the test again go to the " Settings " tab.


Category: Macd

Similar articles: