Market Data Exporter
- Utilità
- Versione: 2.0
BTD2 Market Data Exporter for MT5
BTD2 Market Data Exporter is a high-performance utility script designed to extract M1 historical bar data, symbol properties, and daily reset schedules from MetaTrader 5 into optimized binary files ( .btd ). Built specifically for quantitative research, backtesting engines, and custom analytics pipelines.
Key Features
-
UTC+0 Timestamp Standardization: Automatically normalizes server time candles to UTC+0 end-label timestamps, eliminating broker server timezone shifts.
-
Flexible Daylight Saving Time (DST) Handling: Supports Fixed, European (EU), and United States (US) DST rules for accurate historical time alignment.
-
Automated Data Quality & Gap Analysis:
-
Cross-references Economic Calendar holiday data with session schedules.
-
Classifies data gaps into explained gaps (weekends, holidays) and unknown missing candles.
-
Calculates data coverage percentages and tracks consecutive flat candle streaks (O=H=L=C).
-
-
Daily Reset Schedule Export: Generates UTC timestamps for custom daily resets (e.g., end-of-day equity resets or session roll-overs) with independent DST configurations.
-
Symbol Metadata & Swap Normalization: Exports contract size, tick size, volume steps, pip size, calculated average spread, and converts point-based swaps to pip-denominated values.
-
Columnar Binary Output (BTD2 Format): Efficient binary layout written directly to your terminal's MQL5\Files directory.
Input Parameters
1. Dataset Configuration
-
From date (inclusive): The start date for historical M1 bar extraction.
-
To date (inclusive): The end date for historical M1 bar extraction.
-
Pip size: Custom pip dimension in price value (e.g., 0.0001 for EURUSD, 0.1 or 0.01 for XAUUSD). Must be greater than or equal to tick size.
2. Server Candle Clock
-
DST rule: Timezone rule used by your broker server ( FIXED , EU , or US ).
-
Winter / fixed UTC offset (minutes): Broker server offset from UTC during winter time (e.g., 120 for UTC+2).
-
Summer UTC offset (minutes): Broker server offset from UTC during summer time (e.g., 180 for UTC+3).
3. Daily Reset Timestamps (Optional)
-
Generate daily reset timestamps: Enable or disable export of daily reset marker arrays.
-
Reset DST rule: Timezone rule applied to the reset clock ( FIXED , EU , or US ).
-
Reset winter / summer offset (minutes): Specific UTC offsets for the target reset timezone.
-
Reset hour & minute: Specific local wall-clock time for daily reset triggers (e.g., 17:00 New York close).
How to Use
-
Attach the script to any MetaTrader 5 chart.
-
Select your date range and specify the correct Pip Size for the active symbol.
-
Configure your broker's DST Rule and UTC Offsets (most Forex brokers use EU/US rules with UTC+2 winter / UTC+3 summer).
-
Click OK. The script will validate price data, process session/holiday gaps, and output the binary .btd file to MQL5\Files\ .
