How to Backtest an EA on MT4

Greetings, earthlings!

I’ve received several comments from human traders asking how I am able to run backtests using expert advisors on the MT4 platform. It has come to my attention that newbie traders could appreciate a quick how-to on using the handy-dandy Strategy Tester feature of MT4 so I decided to write a quick guide to help y’all get started.

Before we get started though, make sure you’ve finished the School of Pipsology lesson on How to Use MetaTrader 4. This should help you out with the basics of installing an EA as well.

Once you’re done with that, open the Strategy Tester panel by clicking on View then selecting Strategy Tester.

MT4 Forex Strategy Tester

A panel should magically appear on the bottom part of your MT4 platform. Choose the EA you installed from the Expert Advisor choices.

Forex EA Choices

Set the currency pair you want to run the backtests on and the appropriate period by clicking on the menu beside Symbol and Period. Specify the backtesting period by setting your preferred dates and making sure the Use Date box is checked.

In this example, I’m running the backtests using EUR/USD’s 15-minute time frame from February 1, 2013 to February 1, 2014. To ensure better modeling quality, select the Every Tick option for the model and select Current for the spread.

Forex EA Example

You have to make sure that your price history data is complete to avoid mismatched chart errors on your trading log or have a modeling quality that’s lower than 90%. To do this, head over to the History Center under Tools or simply hit F2 on your keyboard.

From the pop-up window, double-click the currency pair you’ll be running the backtests on and check if the time frame you selected is included in the database. If not, select the time frame and click the download button below.

MT4 Forex History Center

It is recommended that you include the 1-minute tick data for more accurate backtest results, but this might take a lot of space in your hard drive and based on this robot’s experience, it could lead some programs to crash. Don’t say you haven’t been warned!

Once the history data is complete, you are finally ready to run the backtest. Just hit the Start button on the right-hand side of the panel and let the number-crunching commence!

After a few seconds or minutes (depending on your backtesting period and the speed of your processor), you can be able to view the results through the Graph or Results tab at the bottom of the Strategy Tester panel. As I always mention though, make sure you take these numbers with a grain of salt as past performance is not always indicative of future results.

I hope this basic tutorial makes forex robots a little less intimidating for newbies out there! If you have any questions, just post ’em in the comment box below. And for the expert traders around, I’m counting on you to help beginners out!

*beep beep boop beep*



  • raj

    is there any way to run and backtest EA s on offline charts? please help me.

    • Robopip

      I think it may be possible if you download the historical data. I’ll look into this!

  • good iedea, good writing.

    • Robopip

      Thanks for sharing your thoughts!

  • Zachary Tokar

    Hello RoboPIP,

    Thanks for your blog and especially the newbie tutorial, please if you the chance, I found all these automated trading systems by Greetings everyone,

    I haven’t found a lot of info on Vladimir Ribakov’s automated trading systems by Vladimir Ribakov, and I would appreciate your advice, thanks!

    • Robopip

      Thanks for reading this tutorial and for sharing your thoughts. I’ll look into that system you mentioned.

  • honeill

    Very useful article.

    • Robopip

      Thanks, I’m glad you liked it!

  • BillyBobPipton

    Yea, great stuff.

    • Robopip

      Thanks for the positive feedback!

  • abid

    very great

  • Pingback: Why You Should Test Your Forex Trading Strategies()

  • Ramza Jain

    thanks for this tutorial

  • Great backtesting guide, just a bit outdated.