OPEN-SOURCE SCRIPT
US Recessions - Shading

This indicator shades the chart background during every U.S. recession as dated by the National Bureau of Economic Research (NBER). Recessions are defined using NBER’s business cycle peak-to-trough months, and the script shades from the peak month through the trough month (inclusive) using monthly boundaries.
What it does
* Applies a shaded overlay on your chart **only during recession periods**.
* Works on any symbol and any timeframe (crypto, equities, FX, commodities, bonds, indices).
* Includes options to:
- Toggle shading on/off
- Choose your preferred shading colour
- Adjust transparency for readability
Why this overlay is important for analysing any asset class
Even if you trade or invest in assets that aren’t directly tied to U.S. GDP (like crypto or commodities), U.S. recessions often coincide with major shifts in:
-Risk appetite (risk-on vs risk-off behaviour)
-Liquidity conditions (credit availability, financial stress)
-Interest-rate expectations and central bank response
-Earnings expectations and corporate defaults
-Volatility regimes (large, sustained changes in volatility)
Having recession shading directly on the price chart helps you quickly see whether price action is happening in a historically “normal” expansion environment, or in a macro regime where behaviour can change dramatically. This is particularly useful in a deeper analysis like comparing GOLD to SPX. This chart makes it clear how in recessions the S&P bleeds against Gold therefor making the concept more visual and better for understanding.
Of course this is just an example of how it can be used, there are plenty of other factors which can be overlayed like unemployment and interest rates for an even better understanding.
Please DM majordistribution.inc on Instagram for any info - FREE - NO Course
What it does
* Applies a shaded overlay on your chart **only during recession periods**.
* Works on any symbol and any timeframe (crypto, equities, FX, commodities, bonds, indices).
* Includes options to:
- Toggle shading on/off
- Choose your preferred shading colour
- Adjust transparency for readability
Why this overlay is important for analysing any asset class
Even if you trade or invest in assets that aren’t directly tied to U.S. GDP (like crypto or commodities), U.S. recessions often coincide with major shifts in:
-Risk appetite (risk-on vs risk-off behaviour)
-Liquidity conditions (credit availability, financial stress)
-Interest-rate expectations and central bank response
-Earnings expectations and corporate defaults
-Volatility regimes (large, sustained changes in volatility)
Having recession shading directly on the price chart helps you quickly see whether price action is happening in a historically “normal” expansion environment, or in a macro regime where behaviour can change dramatically. This is particularly useful in a deeper analysis like comparing GOLD to SPX. This chart makes it clear how in recessions the S&P bleeds against Gold therefor making the concept more visual and better for understanding.
Of course this is just an example of how it can be used, there are plenty of other factors which can be overlayed like unemployment and interest rates for an even better understanding.
Please DM majordistribution.inc on Instagram for any info - FREE - NO Course
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.