OPEN-SOURCE SCRIPT
已更新 Adaptive ATR% Extension Scanner

Identifying when a stock is historically overextended and due for a mean-reverting pullback is a critical component of risk management and scaling out of swing trades. The Adaptive ATR% Extension Scanner provides an objective, mathematical way to measure these extensions based entirely on a stock's unique historical volatility profile.
Rather than relying on static guesses for when a stock is "too far" from its moving average, this tool actively reads the chart's history to tell you exactly when current price action has reached an statistical extreme.
Key Features:
Dynamic Percentile Lookback: The indicator automatically scans the last 20 swing highs (pullbacks) for the specific ticker you are viewing. It calculates the exact ATR% multiple at each peak to establish a unique historical baseline for what constitutes an "extended" move.
Dual-Tier Signals: The script calculates the 75th percentile (Warning) and 90th percentile (Extreme) of past pullbacks. It plots highly customizable signals directly on your chart when the current price breaches these historically significant thresholds.
Multi-MA Variance Scanner: Not every stock respects the same baseline. The built-in dashboard tracks the 10 EMA, 20 EMA, 50 SMA, and 200 SMA simultaneously. It calculates the historical variance for each to determine which moving average produces the most tightly clustered, predictable extensions.
Auto-Best Fit: The script can automatically select the moving average with the lowest historical variance to drive your chart visuals and trigger your signals, completely removing the guesswork.
Customizable Price Bands: Toggle upper price bands on or off to project exactly what dollar amount the stock needs to hit to reach an overextended state, allowing you to easily set advance limit orders.
How to Use:
Leave the MA setting on "Auto (Best Fit)" to let the script find the most predictable baseline for the current ticker. Watch for the warning dots (yellow by default) as a signal to scale out partial positions, and extreme dots (red by default) as a signal to tighten trailing stops aggressively. Full customization options allow you to change dot colors, emojis/characters, opacity, and dashboard visuals to fit your exact charting style.
Rather than relying on static guesses for when a stock is "too far" from its moving average, this tool actively reads the chart's history to tell you exactly when current price action has reached an statistical extreme.
Key Features:
Dynamic Percentile Lookback: The indicator automatically scans the last 20 swing highs (pullbacks) for the specific ticker you are viewing. It calculates the exact ATR% multiple at each peak to establish a unique historical baseline for what constitutes an "extended" move.
Dual-Tier Signals: The script calculates the 75th percentile (Warning) and 90th percentile (Extreme) of past pullbacks. It plots highly customizable signals directly on your chart when the current price breaches these historically significant thresholds.
Multi-MA Variance Scanner: Not every stock respects the same baseline. The built-in dashboard tracks the 10 EMA, 20 EMA, 50 SMA, and 200 SMA simultaneously. It calculates the historical variance for each to determine which moving average produces the most tightly clustered, predictable extensions.
Auto-Best Fit: The script can automatically select the moving average with the lowest historical variance to drive your chart visuals and trigger your signals, completely removing the guesswork.
Customizable Price Bands: Toggle upper price bands on or off to project exactly what dollar amount the stock needs to hit to reach an overextended state, allowing you to easily set advance limit orders.
How to Use:
Leave the MA setting on "Auto (Best Fit)" to let the script find the most predictable baseline for the current ticker. Watch for the warning dots (yellow by default) as a signal to scale out partial positions, and extreme dots (red by default) as a signal to tighten trailing stops aggressively. Full customization options allow you to change dot colors, emojis/characters, opacity, and dashboard visuals to fit your exact charting style.
版本注释
Added the ability to track lower extensions to assist with identifying potential reversal extensions/bottoms. You can now toggle between upside detection, downside detection or both.版本注释
Fixed some bugs. Added more MA and EMA options.版本注释
Fixed some bugs. Added more MA and EMA options.开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。