OPEN-SOURCE SCRIPT

Triad Macro Gauge

326
__________________________________________________________________________________
Introduction
__________________________________________________________________________________
The Triad Macro Gauge (TMG) is designed to provide traders with a comprehensive view of the macroeconomic environment impacting financial markets. By synthesizing three critical market signals—VIX (volatility), Credit Spreads (credit risk), and the Stocks/Bonds Ratio (SPY/TLT)—this indicator offers a probabilistic assessment of market sentiment, helping traders identify bullish or bearish macro conditions.

  • Holistic Macro Analysis: Combines three distinct macroeconomic indicators for multi-dimensional insights.
  • Customization & Flexibility: Adjust weights, thresholds, lookback periods, and visualization styles.
  • Visual Clarity: Dynamic table, color-coded plots, and anomaly markers for quick interpretation.
  • Fully Consistent Scores: Identical values across all timeframes (4H, daily, weekly).
  • Actionable Signals: Clear bull/bear thresholds and volatility spike detection.


Optimized for timeframes ranging from 4 hour to 1 week, the TMG equips swing traders and long-term investors with a robust tool to navigate macroeconomic trends.

__________________________________________________________________________________
Key Indicators
__________________________________________________________________________________
  • VIX (CBOE:VIX): Measures market volatility (negatively weighted for bearish signals).
  • Credit Spreads (FRED:BAMLH0A0HYM2EY): Tracks high-yield bond spreads (negatively weighted).
  • Stocks/Bonds Ratio (SPY/TLT): Evaluates equity sentiment relative to treasuries (positively weighted).


__________________________________________________________________________________
Originality and Purpose
__________________________________________________________________________________

The TMG stands out by combining VIX, Credit Spreads, and SPY/TLT into a single, cohesive indicator. Its unique strength lies in its fully consistent scores across all timeframes, a critical feature for multi-timeframe analysis.

Purpose: To empower traders with a clear, actionable tool to:
  1. Assess macro conditions
  2. Spot market extremes
  3. Anticipate reversals


__________________________________________________________________________________
How It Works
__________________________________________________________________________________
  • VIX Z-Score: Measures volatility deviations (inverted for bearish signals).
  • Credit Z-Score: Tracks credit spread deviations (inverted for bearish signals).
  • Ratio Z-Score: Assesses SPY/TLT strength (positively weighted for bullish signals).
  • TMG Score: Weighted composite of z-scores (bullish > +0.30, bearish < -0.30).
  • Anomaly Detection: Identifies extreme volatility spikes (z-score > 3.0).


All calculations are performed using daily data, ensuring that scores remain consistent across all chart timeframes.

__________________________________________________________________________________
Visualization & Interpretation
__________________________________________________________________________________

The script visualizes data through:
  • A dynamic table displaying TMG Score, VIX Z, Credit Z, Ratio Z, and Anomaly status, with color gradients (green for positive, red for negative, gray for neutral/N/A).
  • A plotted TMG Score in Area, Histogram, or Line mode, with adaptive opacity for clarity.
  • Bull/Bear thresholds as horizontal lines (+0.30/-0.30) to signal market conditions.
  • Anomaly markers (orange circles) for volatility spikes.
  • Crossover signals (triangles) for bull/bear threshold crossings.


The table provides an immediate snapshot of macro conditions, while the plot offers a visual trend analysis. All values are consistent across timeframes, simplifying multi-timeframe analysis.

__________________________________________________________________________________
Script Parameters
__________________________________________________________________________________
Extensive customization options:
  • Symbol Selection: Customize VIX, Credit Spreads, SPY, TLT symbols
  • Core Parameters: Adjust lookback periods, weights, smoothing
  • Anomaly Detection: Enable/disable with custom thresholds
  • Visual Style: Choose display modes and colors


__________________________________________________________________________________
Conclusion
__________________________________________________________________________________

The Triad Macro Gauge by Ox_kali is a cutting-edge tool for analyzing macroeconomic trends. By integrating VIX, Credit Spreads, and SPY/TLT, TMG provides traders with a clear, consistent, and actionable gauge of market sentiment.

Recommended for: Swing traders and long-term investors seeking to navigate macro-driven markets.

__________________________________________________________________________________
Credit & Inspiration
__________________________________________________________________________________

Special thanks to Caleb Franzen for his pioneering work on macroeconomic indicator blends – his research directly inspired the core framework of this tool.

__________________________________________________________________________________
Notes & Disclaimer
__________________________________________________________________________________

This is the initial public release (v2.5.9). Future updates may include additional features based on user feedback.

Please note that the Triad Macro Gauge is not a guarantee of future market performance and should be used with proper risk management. Past performance is not indicative of future results.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.