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
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.