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
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。