OPEN-SOURCE SCRIPT

ATR Squeeze Background

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

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。