Have you ever backtested an Expert Advisor with positive results, only to start trading and watch it drain your account balance?
This discrepancy typically occurs with scalping Expert Advisors that place many trades daily and have take profits and/or stop losses within 10-15 pips. Those EAs with less frequent trades and wider profit targets tend to fare better with the native backtesting and historical data in MetaTrader 4.
Backtesting of scalping EAs can be unreliable due to the MetaTrader 4 program design. The client terminal can only retrieve data from the history center in the form of minute-to-minute bar data and NOT true tick-by-tick data. Even then, MetaTrader 4 only captures the open, high, low, close, and number of ticks in that minute bar. This leads MetaTrader 4 to approximate the tick data between each minute which, while “close enough” in the big picture, is not “close enough” when your scalping EA depends on the true value of each tick.
However, while MetaTrader 4 can’t retrieve tick-by-tick data for backtests, it is capable of processing it if you provide the data yourself. If you have access to the historical data and format it correctly, you can feed it to MT4 to read and analyze.
Obtaining this data is not difficult, and there are a number of ways to obtain it yourself, or alternatively, a couple of programs that can do it for you.
There are a number of places where individual traders can find, download, and work with tick data. Dukascopy, Pepperstone, TrueFX, and GAIN Capital all make their tick data publicly available. The easiest way to download this data is to navigate to the TrueFX site and click on Downloads. There, you’ll find the “historical tick-by-tick data” section with historical data dating back to 2009.
The data will be downloaded in .csv format, which you’ll then need to convert to an FXT format, MT4’s proprietary file format for price data. In order to convert the file, you’ll need to find a conversion script which are widely available on the internet for free.
Once the file data is in FXT format, copy the outputted file into the tester\history folder of your MT4 installation directory. Overwrite any existing FXT files.
Now open your MetaTrader 4 terminal, and select your Expert Advisor. Select the currency pair you just downloaded and reformatted. Run your backtest. Your report should now show a modeling quality of 99%.
As a shortcut, we prefer to use Tickstory, a free application that interfaces with any MetaTrader 4 platform and automatically downloads, converts, and formats historical forex data from Dukascopy for just about any currency pair. Tickstory also lets you use this data to backtest your EAs on your preferred MetaTrader 4 platform.
Alternatively, a company called StrategyQuant has a product called “Tick Data Downloader” which, like Tickstory, retrieves and formats historical forex data for backtesting.
No matter how you choose to obtain your historical tick data, you’re sure to notice a difference when backtesting your scalping or news trading Expert Advisors.
For savvy investors, algorithmic trading can be a powerful and profitable tool. Contact our trading experts at firstname.lastname@example.org for additional assistance with Expert Advisor backtesting and tips for crafting successful trading strategies. Alternatively, if trading expert advisors on your own account(s) isn’t up your alley, you may be interested in Back Bay Markets’ exclusive signal trading programs with vetted money managers.
Check out Back Bay Markets’ Top Choices for Social Trading Platforms for 2016!