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-10Why 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
- Go to tickstory.com and download TickStory Lite (the free version is sufficient)
- Install it and launch it
- 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
- In TickStory, click "Download Tick Data"
- Select the currency pairs you need (e.g., EURUSD, GBPUSD, XAUUSD)
- Set your date range — for EA development, we recommend at least 2–3 years of data
- 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:
- In TickStory, select your downloaded pair
- Click "Export" → choose MetaTrader 5 (.hst) format — or preferably "Export to MT5" which places the data directly into your MT5 data folder
- Alternatively, use the "MT5 Tick Export" option which exports
.mfxtick 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
- In MT5: Tools → History Center
- Select the symbol
- Click Import and choose the exported
.hstfile
Step 5: Run the Strategy Tester
- Open Strategy Tester (Ctrl+R)
- Select your EA
- Set model to "Every Tick Based on Real Ticks"
- Select your date range (should match the imported data)
- 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.