OPEN-SOURCE SCRIPT

10Y–2Y Treasury Yield Curve Spread & MES % Change

127
📝 Description:

This indicator tracks the U.S. 10-Year minus 2-Year Treasury yield spread — a powerful macroeconomic signal often used by professional traders to gauge market sentiment and recession risk — and overlays an optional MES % change line to help intraday futures traders spot macro–price divergences in real time.

Features:

🏦 Plots the 10Y–2Y spread, with optional EMA smoothing.

📉 Highlights yield curve inversion (background turns red when spread < 0).

📊 Optional MES % change line from daily or RTH open for directional bias.

🔔 Alert conditions for:

Yield curve inversion / un-inversion.

Sudden spread spikes in basis points (customizable).

🧮 Optional correlation plot to visualize relationship strength between MES and the yield curve.

🧭 Z-score normalization allows both series to be viewed in one pane without scaling issues.

Why it matters:

A falling or inverted 2s10s spread often signals risk-off behavior and pressure on equities.

A steepening curve tends to support risk-on rallies.

Divergences between MES price action and the spread can provide early warning signals of reversals or fakeouts.

Best used with:

MES (MES1!) or MYM charts for intraday & swing bias.

Fed event days, CPI/NFP, or any macro-sensitive sessions.

VWAP or structure-based intraday trading strategies.

⚠️ Note: This indicator is for informational purposes only and does not constitute financial advice. Always combine macro context with your own trade plan and risk management.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.