Backtesting

How to Get Reliable Tick Data for MT5 Backtesting

A step-by-step guide to downloading high-quality Dukascopy tick data with TickStory and importing it into MetaTrader 5 for accurate backtesting.

2024-02-10

Why Data Quality Matters

The accuracy of your backtest is only as good as your tick data. MetaTrader 5's built-in history is decent for daily and H4 strategies, but for scalping, news trading, or any tick-sensitive EA, you need real tick data.

The best free source: Dukascopy (via TickStory).


What You'll Need

  • TickStory Lite (free)
  • A MetaTrader 5 installation
  • ~5–20 GB of disk space (depending on date range and pairs)

Step 1: Download and Install TickStory

  1. Go to tickstory.com and download TickStory Lite (the free version is sufficient)
  2. Install it and launch it
  3. On first launch, it will prompt you to configure a data folder — choose a location with enough free space

Step 2: Download Tick Data from Dukascopy

  1. In TickStory, click "Download Tick Data"
  2. Select the currency pairs you need (e.g., EURUSD, GBPUSD, XAUUSD)
  3. Set your date range — for EA development, we recommend at least 2–3 years of data
  4. Click Download

TickStory downloads directly from Dukascopy's servers. Speeds vary but expect a few minutes per pair per year of data.


Step 3: Export to MT5 Format

Once downloaded:

  1. In TickStory, select your downloaded pair
  2. Click "Export" → choose MetaTrader 5 (.hst) format — or preferably "Export to MT5" which places the data directly into your MT5 data folder
  3. Alternatively, use the "MT5 Tick Export" option which exports .mfx tick files

Important settings:

  • Spread: Set to a realistic fixed spread (e.g., 1.5 pips for EURUSD)
  • Or use variable spread if your broker data supports it

Step 4: Import into MetaTrader 5

Option A — Direct Export (Recommended)

TickStory's "Export to MT5" copies files directly into your MT5 history/ folder. MT5 will pick them up automatically on next restart.

Option B — Manual Import

  1. In MT5: Tools → History Center
  2. Select the symbol
  3. Click Import and choose the exported .hst file

Step 5: Run the Strategy Tester

  1. Open Strategy Tester (Ctrl+R)
  2. Select your EA
  3. Set model to "Every Tick Based on Real Ticks"
  4. Select your date range (should match the imported data)
  5. Run

You'll see the data quality bar in the tester — with proper Dukascopy data, you should see 90%+ quality.


Tips

  • Always backtest on at least 2 different years — one for optimization, one for walk-forward validation
  • Don't over-optimize. If a strategy only works on one specific date range, it's curve-fitted
  • All Trade't EAs include a strategy tester guide with recommended settings in the user guide

Summary

| Step | Tool | What you do | |------|------|-------------| | 1 | TickStory | Install, configure data folder | | 2 | TickStory | Download tick data from Dukascopy | | 3 | TickStory | Export to MT5 format | | 4 | MT5 | Import or auto-detect data | | 5 | MT5 Strategy Tester | Run on "Every Tick Based on Real Ticks" |

With this setup, your backtests will accurately reflect what would have happened in live conditions — including spread fluctuations, latency, and partial fills.