OPEN-SOURCE SCRIPT
ATR Squeeze Background

This simple but powerful indicator shades the background of your chart whenever volatility contracts, based on a custom comparison of fast and slow ATR (Average True Range) periods.
By visualizing low-volatility zones, you can:
* Identify moments of compression that may precede explosive price moves
* Stay out of choppy, low-momentum periods
* Adapt this as a component in a broader volatility or breakout strategy
🔧 How It Works
* A Fast ATR (default: 7 periods) and a Slow ATR (default: 40 periods) are calculated
* When the Fast ATR is lower than the Slow ATR, the background is shaded in blue
* This shading signals a contraction in volatility — a condition often seen before breakouts or strong directional moves
⚡️ Why This Matters
Many experienced traders pay close attention to volatility cycles. This background indicator helps visualize those cycles at a glance. It's minimal, non-intrusive, and easy to combine with your existing tools.
🙏 Credits
This script borrows core logic from the excellent “Relative Volume at Time” script by TradingView. Credit is given with appreciation.
⚠️ Disclaimer
This script is for educational purposes only. It does not constitute financial advice, and past performance is not indicative of future results. Always do your own research and test strategies before making trading decisions.
By visualizing low-volatility zones, you can:
* Identify moments of compression that may precede explosive price moves
* Stay out of choppy, low-momentum periods
* Adapt this as a component in a broader volatility or breakout strategy
🔧 How It Works
* A Fast ATR (default: 7 periods) and a Slow ATR (default: 40 periods) are calculated
* When the Fast ATR is lower than the Slow ATR, the background is shaded in blue
* This shading signals a contraction in volatility — a condition often seen before breakouts or strong directional moves
⚡️ Why This Matters
Many experienced traders pay close attention to volatility cycles. This background indicator helps visualize those cycles at a glance. It's minimal, non-intrusive, and easy to combine with your existing tools.
🙏 Credits
This script borrows core logic from the excellent “Relative Volume at Time” script by TradingView. Credit is given with appreciation.
⚠️ Disclaimer
This script is for educational purposes only. It does not constitute financial advice, and past performance is not indicative of future results. Always do your own research and test strategies before making trading decisions.
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.