US Market Data Feed Pro
- 유틸리티
- Marcelo Alejandro Borasi
- 버전: 1.0
- 활성화: 10
US Market Data Feed Pro — MQL5 Market Description
=============================================
US Market Data Feed Pro is a real-time financial data utility for MetaTrader 5. It automatically collects US economic calendar events, MAG7 earnings dates, Treasury yields, VIX, NYSE holidays, and Quad Witching dates from multiple sources and saves everything into simple text files that any Expert Advisor can read.
It does NOT trade. It feeds data to your trading systems.
═══════════════════════════════════════════════
WHAT DOES IT DO?
═══════════════════════════════════════════════
The EA generates 3 text files in MQL5/Files/data/:
✦ news.txt — Full economic calendar + events
- US macro events: CPI, NFP, FOMC, GDP, ISM, PCE, PPI and more
- MAG7 earnings dates: AAPL, MSFT, NVDA, GOOGL, META, TSLA, AMZN
- Quad Witching dates (quarterly options/futures expiration)
- Events tagged as [HIGH] or [MED] importance
- All times in Eastern Time (ET)
✦ yields.txt — Treasury Yields + Volatility
- US 10-Year Treasury Yield
- US 2-Year Treasury Yield
- Yield Spread (10Y - 2Y)
- CBOE VIX (Volatility Index)
✦ holidays.txt — NYSE Closed Days
- All NYSE holidays for 3 years ahead
- Prevents your EA from trading on closed days
═══════════════════════════════════════════════
WHY DO YOU NEED THIS?
═══════════════════════════════════════════════
Your trading EA can read these files and automatically:
- Pause trading before high-impact news (CPI, NFP, FOMC)
- Switch to risk-off mode when VIX is above 20
- Widen stops or reduce position size near MAG7 earnings
- Skip trading on NYSE holidays
- Monitor the yield curve for recession signals (inverted spread)
Works with any symbol, any timeframe, any strategy. The data is universal US market data.
═══════════════════════════════════════════════
DATA SOURCES
═══════════════════════════════════════════════
- Economic events → MT5 Built-in Calendar (no API key needed)
- Treasury Yields → Treasury.gov (free, no API key, no rate limit)
- MAG7 Earnings → Alpha Vantage (free API key)
- VIX → FRED (free API key)
- Earnings fallback → Finnhub (free API key)
- Holidays → Generated locally (no API needed)
- Quad Witching → Generated locally (no API needed)
═══════════════════════════════════════════════
DATA PROTECTION
═══════════════════════════════════════════════
- Automatic backup before every update
- Section-by-section protection: if one source fails, others are preserved
- Smart restart: if files are fresh after MT5 restart, no API calls are wasted
- Yield protection: if API fails, existing data is kept intact
═══════════════════════════════════════════════
UPDATE SCHEDULE
═══════════════════════════════════════════════
- Economic Calendar + Earnings: Every 12 hours (07:30 and 18:00 ET)
- Yields + VIX: Every 15 minutes (08:00–16:00 ET)
- Holidays: Every 15 days
Timezone-aware: converts broker time to Eastern Time automatically, including DST.
═══════════════════════════════════════════════
INPUT PARAMETERS
═══════════════════════════════════════════════
General Settings:
- NewsUpdateHours (default: 12) — Hours between calendar updates
- HolidaysUpdateDays (default: 15) — Days between holiday updates
- EconomicCalendarDays (default: 30) — How many days ahead to look
- VerboseMode (default: true) — Show detailed logs
- DataFolder (default: "data") — Subfolder inside MQL5/Files
API Keys:
- AVKey — Alpha Vantage key for MAG7 earnings (free)
- FredAPIKey — FRED key for yields and VIX (free)
- FinnhubAPIKey — Finnhub key, backup earnings source (free, optional)
Yields:
- EnableBondYields (default: true) — Enable yield and VIX updates
- YieldsUpdateMinutes (default: 15) — Minutes between updates
- YieldsSessionStart (default: "08:00") — Start time ET
- YieldsSessionEnd (default: "16:00") — End time ET
Alerts (all OFF by default):
- AlertPopup (default: false) — Popup before high-impact events
- AlertSound (default: false) — Play MT5 alert sound
- AlertMinutesBefore (default: 15) — Minutes before event to alert
Visual Panel:
- ShowPanel (default: true) — Show status panel on chart
- PanelX, PanelY — Panel position
- PanelWidth (default: 350), PanelHeight (default: 265)
- Color settings for background, border, text
═══════════════════════════════════════════════
SETUP (5 MINUTES)
═══════════════════════════════════════════════
1. Get free API keys from Alpha Vantage, FRED, and Finnhub (links in documentation)
2. In MT5: Tools → Options → Expert Advisors → Allow WebRequest for:
3. Attach to any chart, paste your keys in the Inputs tab
4. Done — files appear in MQL5/Files/data/
═══════════════════════════════════════════════
COMPATIBILITY
═══════════════════════════════════════════════
- MetaTrader 5 build 2361 or later
- Any broker (timezone auto-detected)
- Any chart (attach to any symbol, any timeframe)
- Does not interfere with other EAs or indicators
- Low resource usage: empty OnTick, timer every 60 seconds
