| Metatrader 4 Backtesting | ||
| How to backtest an EA on Metatrader 4 | ||
| One of the the great advantages about Forex trading is that you
can back test your strategy. Strategy backtesting is a very simple
process when Metatrader 4 is used as your trading platform. The
Metatrader4 is one of the best Forex trading platforms ever created
and is readily available from any Forex broker. Backtesting may be simple but there are few rules you should follow. and the most important one of these rules is not to use data from a generic source. All data must be obtained from your broker server. Unfortunately most people ignore this and head directly to the Metatrader history download center where all data is actually obtained from third party servers. The data from third party servers differ greatly from the one you can readily have from your own broker server, thus your bactesting results are not reliable and should not be considered in determining the success of your Forex strategy. Obtaining data from your broker server is actually very easy and readily available. All you have to do is keep your chart on the M1 time frame, once you have this access to that the other time frames are much easier to get when you briefly switch your chart to the other longer time frames. This is a fact because there is so much data in the M1 time frame. The instrument price changes more than 30 times per minute and as there are so many minutes per day you can imagine the size of data needed to cover few months in the m1 time frame. Only a fifth of that amount of data is needed on the M5 period and so on for the other longer periods. So once you have the data for the shortest time frame the others time frames are very easy to calculate by your trading platform if not already loaded by brief switching to the longer periods on your Forex charts. Besides having your Forex trading chart on the shortest time frame you should also scroll back your chart in the weekends as far as you can. Forex brokers leave theirs servers on for you most of the weekend and during those times the Forex market is usually closed for trading and the servers are not overloaded. The weekends are the best times in the week to scroll your charts back to obtain as much data as you possibly can directly from your broker server so you can backtest you Forex strategy. Another rule you should follow is that you should stick to most recent times. Forex market changes its behavior rapidly and nothing that worked years ago would work today. so it makes no sense to get data for the ancient times. you should concentrate on the last few months only, in fact this makes things easier for you. Since it is nearly impossible to get accurate dependable data for all time frames for ancient times. You should concentrate on getting a full set of data for a particular Forex instrument for few months back without interruptions all the way to the day in which you perform your back test. The third and the final rule I would like to mention here that you should keep in mind when it comes to backtesting Forex in Metatrader is this: Do not try to take a short cut. Many people who are new to Forex trading perform backtest of a failing Expert advisors within minutes and get successful results. Even if you use the most powerful workstation a back test on Metatrader 4 would take few hours to complete, and that even without using the visual mode in which you could see the trades and the price movements on the chart. The speed of the movement in a simulation is highly dependent on your computer memory and processing power. Backtesting must always be done based on every tick of market data or your back test may be nothing but misleading. The more open trades overlap and a trailing stop is used the more is the processing needed by your CPU and thus the longer the time a back test would take. So why rush a good thing, Start your backtest correctly and leave it to take its course while you are doing whatever thing you like to do, In the end of the test Mt4 will hand you the full report that you can look at and study, so you can then modify your options and go for the next backtest, and so on and on. Forever. |
||
| Backtesting with Forexbody Expert Advisor latest version: | ||
![]() |
||
| You must make sure you have data as outlined in the article above, Select a recent period range, time frame for the test | ||
| You must also load the EA settings from the Expert Advisor properties. Use latest available settings as starting point. Never test on default settings. default settings are never provided for use. In trading you must load Forexbody latest template and in back testimg yu can get same template setting by loading the settings file provided for the tester by clicking load in the input tab of the parameter window as shown below | ||
|
||
![]() |
5- Version 401.0 backtest with all weekdays scalping and normal trading: Mode = 2 enabled. September 1st to date | |
| One final long back test before uploading installer to premium user download pages: Testing the above with the all new News module trading enabled | ||
![]() |
6- Version 401.0 backtest of News trading Module alone started in September 1st. thru October 16. Only the news trading module trades with Riskmax 0.1 on 1k account | |
| The direction of the news trade is not something that has to be changed from time to time based on last year market pattern. in current settings the direction is up and n each weekly update this setting will reflect latest research. So to combine all modules in 1 test we can only use current month as shown below; in future updates we will add feature to the news module that changes trades direction automatically based on last year pattern. | ||
![]() |
7- Version 401.0 on current month with News trading directio set to 1 (Buy) and trade mode = 2 | |
![]() |
8- Version 401.0 on current month with News trading directio set to 2 (Sell) and trade mode = 2 | |
![]() |
9- Version 401.0 on current month with news trading module disabled and trade mode = 2 | |
![]() |
10- Version 401.0 on current month with news trading module disabled and scalping disabled which exactly like having 4.00.5 without scalping | |
![]() |
11- Version 401.0 on current month with news trading module enabled (buy) without scalping | |
![]() |
12- Version 401.0 on current month with news trading module enabled (Sell) without scalping | |
![]() |
13- Version 401.0 on current
month with news trading module
disabled and trade mode = 2 on $100
deposit Autoriskmax effect by account size |
|
![]() |
14- Version 401.0 on current
month with news trading module
disabled and trade mode = 2 on
$10000 deposit Autoriskmax effect by account size |
|
![]() |
15- Version 401.0 on current
month with news trading module
disabled and trade mode = 2 on $100
000 deposit Autoriskmax effect by account size
|
|
![]() |
16- Version 401.0 on current
month with news trading module
disabled and trade mode = 2 on $500
000 deposit Autoriskmax effect by account size
|
|
![]() |
17- Version 401.0 on
last 4
months with news trading
module disabled and trade mode = 2
on $500 000 deposit Autoriskmax effect by account size
|
|
| Conclusion: | ||
| What we think is best settings will be provided as a template for EURUSD chart and it automatically loads what we think is best risk/reward ratio for any size account, but you are free to edit settings in EA properties parameters window as you wish. Do not forget to restart MT4 after settings change to insure settings are saved permanently because Mt4 saves settings at exit and if it is not shut down properly your setting are not saved. Also do not forget to enter your broker time shift in the EA properties. We provide 0 for 0 gmt brokers. | ||
| For more information about this Expert advisor visit our Automated Forex Expert Advisor website, | buy this EA |