OPEN-SOURCE SCRIPT

ATR Squeeze Background

190
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.

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.