OPEN-SOURCE SCRIPT
ATR % of yesterday close with SMA (Bull/Bear colored)

This script visualizes the Average True Range (ATR) as a percentage of a user-selected price point for a quick view of volatility.
ATR % values are plotted as a color-coded histogram. Bullish days (close > prior close) paint the bar green; bearish days (close < prior close) paint it red; unchanged days are gray.
Two simple moving average (SMA) overlays to reveal volatility trends.
Variables:
Histogram bars represent ATR as a % of one of:
- Previous Close (default option)
- Previous Open
- Today Close
- Today Open
Two SMA lines (default: blue for 20-period, orange for 5-period) shown on ATR % for trend/range regime tracking.
Optionally display the ATR % in continuous line (yellow)—hidden by default.
If you find it helpful, feel free to share any feedback and how you incorporate it into your trading strategy with the community!
ATR % values are plotted as a color-coded histogram. Bullish days (close > prior close) paint the bar green; bearish days (close < prior close) paint it red; unchanged days are gray.
Two simple moving average (SMA) overlays to reveal volatility trends.
Variables:
Histogram bars represent ATR as a % of one of:
- Previous Close (default option)
- Previous Open
- Today Close
- Today Open
Two SMA lines (default: blue for 20-period, orange for 5-period) shown on ATR % for trend/range regime tracking.
Optionally display the ATR % in continuous line (yellow)—hidden by default.
If you find it helpful, feel free to share any feedback and how you incorporate it into your trading strategy with the community!
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。