Multi-Factor FX Analysis in MT5: COT, CB Rates, Carry, and ESI in One Terminal
Professional FX analysis draws from several distinct data streams simultaneously: central bank policy trajectories, speculative positioning from CFTC reports, carry yield differentials, macroeconomic surprise momentum, options market skew, and cross-asset correlations. Each of these signals lives in a different place — rate derivatives platforms, government data portals, broker swap specifications, options desks.
The practical consequence for a systematic trader is a fragmented pre-session workflow: multiple browser tabs, manual data reconciliation, and the near-certainty that some signal will go stale or be missed entirely during a live session. The larger problem is not data access — most of this information is publicly available — but synthesis: bringing it into a single decision surface where relationships between signals are immediately legible.
This article presents the Global Investing FX Terminal, an Expert Advisor for MetaTrader 5 that addresses this problem. It consolidates thirteen analytical panels into a single canvas rendered directly over the chart window, drawing from both the MT5 native data environment and an external pipeline that processes publicly available institutional datasets on a continuous basis. A companion web terminal at globalinvesting.github.io provides the same analytical framework in a browser, extending the workflow beyond the trading station.
Figure 1. Global Investing FX Terminal — full canvas overlay in MetaTrader 5.
Analytical Architecture: Thirteen Panels, One Canvas
The terminal renders as a full-window canvas overlay — a single composited frame that eliminates the flicker and partial-refresh artifacts characteristic of object-based dashboard approaches in MT5. The layout adapts to any monitor resolution through a configurable scale multiplier accessible from the top bar (A+ / A−). All panels refresh on a user-defined cycle; the default is ten seconds.
The thirteen panels divide naturally into three layers of analysis: market microstructure (live prices, calendar, open positions), macro-fundamental signals (CB rates, OIS expectations, COT positioning, ESI, composite score), and risk context (carry, volatility, correlations, retail sentiment). What follows is a description of each panel oriented toward analytical utility.
Market Microstructure Layer
FX Pairs Table
Live bid/ask prices for all 28 major G10 pairs sourced from the MT5 symbol feed in real time. Each row displays spread in points, daily and weekly percentage change, absolute daily range in pips, and the current range as a percentage of the 14-day Average Daily Range (ADR%).
The ADR% column provides immediate session-timing context. A pair trading at 100% of its statistical daily range has consumed its typical directional extension and is unlikely to generate further meaningful movement without a catalyst. A pair at 30% ADR mid-session retains room for continuation. Row colors update tick-by-tick using the terminal's amber/dark palette, maintaining legibility under the high-contrast demands of a live trading environment.
Figure 2. FX Pairs Table and Economic Calendar panels.
Economic Calendar
Upcoming high-impact economic events surfaced from the MT5 native calendar API — the same dataset underlying the MetaTrader 5 calendar tab, displayed inline within the analytical framework without requiring a context switch. Each row shows event name, currency, importance level, time to release, and previous/forecast/actual values once published. Events within 15 minutes of release are highlighted in amber as a pre-alert signal ahead of the MT5 push notification.
The analytical value is sequencing: knowing that three JPY data releases cluster at the Tokyo open, or that a BoC statement falls 20 minutes into the New York session, directly informs position sizing and timing decisions in ways that no price chart communicates on its own.
Open Positions
Live account exposure pulled directly from the MT5 terminal: symbol, direction, volume, open price, current P&L in account currency, and accrued swap. Refreshes on every tick cycle. The analytical value is adjacency — a trader monitoring an open AUD/USD long can simultaneously view COT showing leveraged funds at near-extreme short positioning in AUD, the CB Rates panel showing RBA at 4.35% with a Hike signal, and carry showing positive annualised yield, all on a single screen without navigating away from the position view.
Macro-Fundamental Layer
CB Rates & Bias
Policy rates for all eight G10 central banks (Fed, ECB, BoE, BoJ, RBA, BoC, SNB, RBNZ), alongside three forward-looking data points per bank: the current policy bias (Hawkish / Neutral / Dovish / Cut / Hike), the OIS market-implied probability of a move at the next meeting expressed as a percentage, and the next meeting date.
The bias signals are updated following each major central bank meeting and communication event. The probability column — displaying values such as 100%H for ECB or 97%H for BoJ — reflects live OIS market pricing of the next decision. For pair analysis, the divergence between two central banks' bias columns is often the most durable FX signal available: a Hawkish ECB against a Hold Fed is a structural tailwind for EUR that tends to persist across multiple sessions.

Figure 3. Central Bank Rates & Bias panel.
COT Positioning — Leveraged Funds
The CFTC Commitments of Traders report represents the most comprehensive public window into institutional speculative positioning across the G10 futures complex, published weekly. The panel displays net leveraged fund positioning for seven currency futures (EUR, GBP, JPY, AUD, CAD, CHF, NZD) in thousands of contracts, the week-over-week change, and a horizontal bar chart that makes direction and relative magnitude immediately visible.
The panel header timestamp reflects the exact week-ending date of the current data, confirming freshness without requiring the trader to cross-reference the CFTC publication schedule.
The analytical edge of COT data is not directional prediction but positioning extreme detection. When leveraged funds hold a multi-year extreme short in JPY — as observed at -41.1% net open interest in the session shown — the asymmetric risk is a sharp squeeze on any catalyst that forces those positions to unwind. The week-over-week change column, showing -19K for JPY in the same session, flags when a crowded trade is beginning to move.

Figure 4. COT Leveraged Fund positioning across G10 currencies.
Surprise Index
A rolling economic surprise index showing how G10 data releases have come in versus consensus forecasts. Each currency receives a single bar: green for data consistently beating expectations, red for consistent misses. The methodology follows the Citi Economic Surprise Index approach — beat/miss/in-line scoring applied to the last N releases per currency, decay-weighted to give greater influence to recent events.
In the captured session: JPY at +0.9, USD at +0.8, AUD at -0.6. Surprise momentum tends to lead currency direction by two to four weeks in low-volatility regimes, as systematic data beats build a revision cycle that eventually gets priced into rate expectations — the ESI flags this shift before it appears in the CB Rates or OIS panels.

Figure 5. Economic Surprise Index panel.
Composite Score
A single ranked score per currency derived from five weighted inputs: COT positioning, retail sentiment, CB bias signal, carry yield, and economic surprise index. The default weighting is shown in the panel footer: COT 30% / Retail 20% / CB 20% / Carry 15% / ESI 15%. The output is a color-coded bar per currency reflecting net bullish or bearish signal confluence across all factors.
This panel is not a mechanical trading signal. It is a rapid-scan surface for identifying where multi-factor evidence is aligned versus conflicted. Currencies with strong unidirectional composite scores warrant further analysis; near-zero scores indicate genuine uncertainty across the factor set.

Figure 6. Composite Score panel — five-factor weighted confluence per currency.
Risk Context Layer
Carry Monitor
All scrollable G10 pairs ranked by annualised carry yield, calculated from the live broker swap specifications available directly within MT5. No external data source is required — the panel reads swap rates from the broker's own symbol feed and converts them to an annualised comparable basis.
Each row shows: long swap (pips/day), short swap (pips/day), net carry annualised (%), 30-day historical volatility as denominator context, Sharpe-adjusted carry score, and the direction of the positive carry trade. The Sharpe column is the primary filter: high-carry pairs with high realised volatility carry a fundamentally different risk profile than moderate-carry pairs in suppressed-volatility regimes. CHF crosses cluster at the lower end of the carry ranking given SNB's negative policy rate (-0.18% at the time of writing).

Figure 7. Carry Monitor — G10 pairs ranked by Sharpe-adjusted annualised carry yield.
Retail Sentiment
Long/short positioning ratios aggregated across 28 pairs, displayed as a percentage bar with the current ratio labeled. Retail positioning is not a timing instrument but a structural context layer: when 88% of retail accounts hold short USD/CAD, as shown in the captured session, it represents a directional crowding that historically precedes squeezes in the opposite direction. Combined with COT institutional data — showing leveraged funds also heavily short CAD at -45.3% net — the confluence of retail and institutional crowding in the same direction adds a distinctive quality of risk signal that neither dataset provides in isolation.

Figure 8. Retail Sentiment panel — long/short ratios across 28 G10 pairs.
Correlation Matrix
A 7×8 rolling correlation matrix covering the seven non-USD G10 currencies against DXY, calculated from daily closes over a configurable lookback period (default: 30 days). High positive correlations render in green; strong negative correlations in red.
The primary use case is position overlap detection. Simultaneous longs in EUR/USD, AUD/USD, and GBP/USD in a 30-day window where all three show high positive correlation to each other is not three independent trades — it is effectively multiple units of DXY short exposure. The matrix makes this visible before entry rather than after a correlated drawdown.

Figure 9. Cross-Asset Correlation Matrix — 30-day rolling, G10 vs. DXY.
Currency Strength
A multi-timeframe momentum chart for all seven non-USD G10 currencies, with timeframe selector buttons (M5 / M15 / H1 / H4 / D1) rendered directly on the panel. The D1 view displays approximately four weeks of relative momentum as overlapping line series, with the current reading labeled per currency. In the captured session on the D1 view: USD +1.5%, JPY +0.8% leading; GBP, CHF, NZD, EUR, and CAD in negative territory.
When this panel's momentum alignment matches the CB Rates bias direction for the same currency, the two signals are reinforcing. When they diverge — a Hawkish-biased currency showing negative momentum — it flags either a temporary correction or a forthcoming bias revision.

Figure 10. Currency Strength Index — multi-timeframe momentum, D1 view.
Volatility & Options
Historical volatility at three lookbacks (7-day, 20-day, 3-month, all annualised from log returns) and risk reversal skew at three tenors (1-week, 1-month, 3-month) for seven major pairs. Risk reversals measure the implied volatility premium of out-of-the-money calls versus puts at equivalent delta. A negative 1-month risk reversal on EUR/USD (-0.36 in the captured session) indicates the options market is pricing more downside risk than upside. A sign flip — from negative to positive — triggers an alert in the terminal and is often a leading indicator of directional shift in the underlying.
USD/CHF showing +0.02 (near flat) while EUR/USD shows -0.36 reflects the options market's relative conviction: more bearish on EUR than on CHF against the dollar at the current moment — a nuance not visible in the spot price alone.
Figure 11. Volatility & Options Skew — historical volatility and risk reversal skew at three tenors.
Market Sessions
The four major trading sessions (Sydney 22:00–07:00, Tokyo 00:00–09:00, London 07:00–16:00, New York 12:00–21:00 UTC) with live open/closed status. Liquidity context modifies the interpretation of every other panel: a pair at 100% ADR during the Tokyo session in a typically London-driven market carries a different analytical weight than the same statistic at the London open.

Figure 12. Market Sessions — live open/closed status for Sydney, Tokyo, London, New York.
Alert System
The terminal monitors all data sources on each refresh cycle and fires MT5 alerts — with optional push notification to the MetaTrader 5 mobile app — when predefined thresholds are crossed:
- Central bank bias classification changes
- OIS-implied meeting probability shifts by more than a configurable threshold (default: 5 percentage points between refresh cycles)
- CFTC COT week-over-week change exceeds a threshold (default: 10,000 contracts), or a new weekly release is detected
- Broker swap rates change materially
- A high-impact calendar event enters the configurable pre-alert window (default: 15 minutes)
- Risk reversal sign flip on any monitored pair
Each threshold crossing is logged with a full timestamp and event description. In the captured session, two distinct events fire independently: COT NZD extreme WoW at -14K contracts, and COT JPY extreme WoW at -19K contracts.
Figure 13. Alert system — COT extreme positioning signal, dual event firing.
The Web Terminal: Extended Research Depth
The companion web terminal at globalinvesting.github.io provides the same core analytical panels in a browser interface, with several additions that exploit the expanded display environment of a full-page layout.
Figure 14. Global Investing web terminal — analytical dashboard overview.
The Real Rate Carry Analysis module adjusts OIS benchmark rates for current inflation expectations sourced from market-implied breakevens and IMF/OECD proxies. The result is a real carry ranking — USD at +1.11% real, NZD at -0.83% real in the captured session — that reflects the purchasing-power-adjusted return of each carry position. A high nominal carry in an economy with accelerating inflation may produce negative real carry, fundamentally altering the trade thesis.

Figure 15. Real Rate Carry Analysis — net yield adjusted for inflation expectations.
The Yield Curve module renders full sovereign yield curves (US, DE, GB, JP, AU, CA, NZ) with today versus prior-close comparison and basis point changes per tenor. The US curve in the captured session — 3M at 3.63%, 2Y at 3.63%, 10Y at 4.53%, 30Y at 5.01%, labeled Steep — contextualises the rate environment. A steep 10Y-2Y spread of 90bp is a structurally different monetary environment than an inverted curve, with distinct implications for carry and risk appetite.

Figure 16. US Treasury Yield Curve — current vs. prior close, basis point changes per tenor.
The Economic Surprises module shows the full event-by-event history underlying the ESI index, with BEAT/MISS/IN LINE outcomes for the last 90 days, decay-weighted to give greater influence to recent releases. USD at +23.5 index with a 53% beat rate on 206 scored events reflects durable data momentum — not a single-event spike.
Figure 17. Economic Surprise Index — USD, 90-day rolling event history with BEAT/MISS/IN LINE scoring.
The COT Positioning Detail panel provides Z-score percentile rankings across a 52-week window and participant-category breakdowns separating Leveraged Funds from Asset Managers and Dealers — a distinction that matters because LF and AM positioning frequently diverge at turning points.

Figure 18. CFTC COT Positioning Detail — leveraged funds Z-score, percentile rank, and participant breakdown.
The Integrated Workflow
The ecosystem supports two complementary phases:
Pre-session (web terminal): Review the macro narrative summary, check CB Rate Expectations for overnight bias shifts, scan the ESI for data momentum divergences, review COT Z-scores for crowded positioning extremes, and check yield curve shape for overnight moves. This takes approximately ten minutes and surfaces the session's highest-conviction analytical context.
Live session (MT5 EA): The terminal runs continuously on a dedicated chart. The Composite Score panel provides a rapid starting-point scan. The Calendar panel flags event risk with live countdown. The Positions panel keeps account exposure visible alongside all macro context. Alerts fire on COT threshold crossings or options sign flips without requiring continuous manual monitoring.
This is not a system that generates trading signals. It is an information architecture that ensures the signals a trader is already monitoring are consolidated, current, and contextually integrated — the standard applied by professional desks through Bloomberg or Refinitiv terminals, available within the MetaTrader 5 environment.
Setup
Requirements: MetaTrader 5, any broker with G10 FX pairs.
Step 1: In MT5, navigate to Tools → Options → Expert Advisors and enable Allow WebRequest for listed URL. Add raw.githubusercontent.com to the URL list. This single permission enables all external data panels.
Step 2: Attach the EA to any chart. The terminal does not use the underlying chart's symbol or timeframe — any chart works. The canvas covers the full chart window.
Step 3 (optional): Adjust inputs to match your broker's symbol naming conventions, preferred refresh interval, and lookback periods for historical calculations.
Step 4: Access the web terminal at globalinvesting.github.io. The EA license key displayed in the terminal's top bar unlocks the full web terminal for the same account.
The Suite
The Global Investing suite includes four products sharing the same analytical framework and visual language:
- Global Investing FX Terminal — the full thirteen-panel EA described in this article.
- CSI Currency Strength — the multi-timeframe momentum indicator from the terminal's Currency Strength panel, available as a standalone chart indicator.
- Carry Trade Monitor — the carry yield ranking panel as a standalone EA, reading directly from broker swap specifications with no external data required.
- Institutional Risk Manager — an execution EA handling ATR-based position sizing, scaled exits at R-multiples, and breakeven automation, with an embedded CSI sub-panel for directional context. Designed to run alongside the GI FX Terminal on a second chart window.
Conclusion
The FX market's analytical complexity is not a problem of data scarcity — the data is largely public. It is a problem of integration: bringing policy rates, positioning, carry, volatility, and macro momentum into a coherent framework that can be consulted in real time, without switching tools or reconciling stale figures.
The Global Investing FX Terminal is built around that problem. Its value is not any individual panel in isolation — it is the simultaneous visibility of all signals in a single frame, allowing relationships and confluences to surface that would otherwise require manual assembly across multiple platforms.
Web terminal: globalinvesting.github.io
MQL5 profile: mql5.com/en/users/santiagopla


