Market Sell-Off GaugeOVERVIEW
The Market Sell‑Off Gauge identifies high‑conviction, risk‑off entry opportunities by detecting broad market sell‑off behavior and rising stablecoin dominance, then confirming risk‑off sentiment via NDX weakness, VIX spikes, and elevated volume. It uses fuzzy logic and sigmoid scaling to convert raw signals into a smooth, bounded metric.
FEATURES
Sell‑Off Detection - calculates percentage drops in the primary asset over a user‑defined lookback.
Stablecoin Dominance Surge - tracks combined USDT/USDC dominance rises as a proxy for on‑chain “flight to safety.”
Macro Confirmation
NDX Weakness (NASDAQ‑100)
VIX Spikes (CBOE Volatility Index)
Elevated Volume on declining bars
Fuzzy Logic & Scaling - component values feed into a fuzzy‑logic membership scor and are passed through a sigmoid compressor (–1 to +1). Weighted aggregation derives the final result of the gauge (or metric).
VISUALISATION
Continuous line plot - Smoothed metric (–1 to +1), colored cold‑to‑warm.
Entry circles - Highlighted when all conditions (fuzzy or crisp) are met after the time offset.
Time‑Offset marker - Vertical line/label showing the user‑specified “start” bar.
Component table - Displays real‑time % changes & volume multiples in the lower right of the indicator.
USAGE
Asset drop % - The threshold percent decline to register a sell‑off.
Stables rise % - The threshold percent increase in stablecoin dominance to qualify as a “flight to safety.”
NDX drop % - The threshold percent decline in the NASDAQ‑100 for macro confirmation.
VIX rise % - The threshold percent increase in VIX. Contributes to risk‑off validation.
Volume Multiplier - Defines how many times above SMA volume must rise to confirm conviction.
Lookback Period - Controls the number of bars over which % changes are measured.
Time Offset - Point in time beyond which bars to “fade” historical signals, enables focus on recent data only.
Fuzzy Logic Settings - Enables fuzzy scoring and set membership threshold & sensitivity.
Weights - allows for adjusting the relative importance of each component (Asset, Stables, NDX, VIX, Volume).
Sigmoid Steepness (k) - Controls curve steepness for compression (0.1 = very flat → 5.0 = very sharp S‑curve).
Chart & settings
Best applied on 4H or Daily BTCUSD (or similar) charts to capture meaningful sell‑off events.
Combine with broader trend filters (e.g., moving averages) for trend‑aligned entries.
Adjust Sigmoid Steepness and Membership Sensitivity to fine‑tune signal crispness vs. smoothness. Refer to tooltips.
Disclaimer
This indicator is intended for educational purposes only. Always perform your own due diligence before making financial decisions.
Marketrisk
Credit Spread Monitor: HY & IG vs US10Y📉 Credit Spread Monitor: HY & IG vs US10Y
This indicator provides a dynamic and visual way to monitor credit spreads relative to the US Treasury benchmark. By comparing High Yield (HY) and Investment Grade (IG) corporate bond yields to the 10-Year US Treasury Yield (US10Y), it helps assess market stress, investor risk appetite, and potential macro turning points.
🔍 What It Does
-Calculates credit spreads:
HY Spread = BAMLH0A0HYM2EY − US10Y
IG Spread = BAMLC0A0CMEY − US10Y
-Detects macro risk regimes using statistical thresholds and yield curve signals:
🔴 HY Spread > +2σ → Potential financial stress
🟠 Inverted Yield Curve + HY Spread > 2% → Recession risk
🟢 HY Spread < 1.5% → Risk-on environment
-Visually highlights conditions with intuitive background colors for fast decision-making.
📊 Data Sources Explained
🔴 High Yield (HY): BAMLH0A0HYM2EY → ICE BofA US High Yield Index Effective Yield
🔵 Investment Grade (IG): BAMLC0A0CMEY → ICE BofA US Corporate Index Effective Yield
⚪ Treasury 10Y: US10Y → 10-Year US Treasury Yield
⚪ Treasury 2Y: US02Y → 2-Year US Treasury Yield (used to detect curve inversion)
✅ This Indicator Is Ideal For:
Macro traders looking to anticipate economic inflection points
Portfolio managers monitoring systemic risk or credit cycles
Fixed-income analysts tracking the cost of corporate borrowing
ETF/Asset allocators identifying shifts between risk-on and risk-off environments
🧠 Why It's Useful
This script helps visualize how tight or loose credit conditions are relative to government benchmarks. Since HY spreads typically widen before major downturns, this tool can provide early warning signals. Similarly, compressed spreads may indicate overheating or complacency in risk markets.
🛠️ Practical Use Case:
You’re managing a multi-asset portfolio. The HY spread jumps above +2σ while the yield curve remains inverted. You decide to reduce exposure to equities and high-yield bonds and rotate into cash or Treasuries as recession risk rises.
📎 Additional Notes
Sourced from FRED (Federal Reserve Economic Data) and TradingView’s bond feeds.
Designed to work best on daily resolution, using open prices to ensure consistency across series with different update timings.
This script is original, not based on built-in or public templates, and intended to offer educational, statistical, and visual insights for serious market participants.