CSV2FXT SCRIPT
To achieve 99.0% modeling quality in MetaTrader 4 (MT4) backtesting, you can use Birt’s CSV2FXT script to convert raw tick data into MT4-compatible FXT and HST files. This method gives you full control over spreads, execution, and data accuracy.
Prerequisites
- MetaTrader 4: Installed and launched at least once.
- Birt’s CSV2FXT Script: Download link provided at the bottom of this page.
- Tick Data (CSV format): From Dukascopy, TrueFX, or Tickstory Lite.
- Tickstory Lite (optional): Used only to download and export CSV tick data.
Important Note
Tickstory Lite is not used to generate FXT files in this workflow. It is optional and serves only as a convenient source of high-quality CSV tick data. The FXT files are generated exclusively by the CSV2FXT script.
Step-by-Step Guide (CSV2FXT Method)
Step 1: Install CSV2FXT into MT4
- Open your MT4 data folder (
File → Open Data Folder). - Copy the contents of the
mql4folder from the CSV2FXT package. - Paste the
Include,Libraries, andScriptsfolders into the MT4MQL4directory. - Restart MT4.
Step 2: Obtain Tick Data (CSV)
- Download tick data from Dukascopy, TrueFX, or Tickstory Lite.
- If using Tickstory Lite:
- Select the symbol and date range.
- Export the data as CSV (not MT4).
- Ensure the CSV contains date, time, bid, and ask prices.
Step 3: Prepare the CSV File
- Place the CSV file in the MT4 directory:
MQL4/Files - Verify the filename matches what you will select in the script inputs.
Step 4: Run the CSV2FXT Script
- Open MT4.
- Open any chart for the correct symbol.
- In the Navigator panel, go to
Scriptsand drag CSV2FXT onto the chart. - Configure the inputs:
- CSV filename
- Timeframe
- Fixed or variable spread
- Commission and execution options
- Click OK and wait for the script to finish.
Step 5: Backtesting in MT4
- Open
View → Strategy Tester. - Select your Expert Advisor.
- Select the correct symbol and timeframe.
- Set model to Every Tick.
- Choose the date range covered by your data.
- Click Start.
Step 6: Verify Results
- Check the report for 99.0% modeling quality.
- Confirm no data mismatch or gaps are reported.
Tips
- Always regenerate FXT files if you change spread or timeframe.
- Use realistic spreads and commissions for reliable results.