OPEN-SOURCE SCRIPT
ATR: Body % + Ranges and Anomalies

ATR: Body % + Ranges and Anomalies
This indicator provides a dual analysis of price bars to help you better understand market dynamics and volatility. It combines two powerful concepts into one tool: a candle body percentage and a range analysis with an anomaly-excluding average.
Key Features:
1. Candle Body Percentage
This feature plots the size of the candle's body as a percentage of its total high-low range.
A high percentage (e.g., above the 50% gray line) indicates strong, directional movement. The more solid the body is relative to its wicks, the more conviction is behind that move.
The 100% red line marks "Marubozu" candles—bars with no wicks, showing absolute control by buyers or sellers.
2. Range Analysis with Anomalies
This is a unique part of the indicator that helps you identify and understand normal vs. abnormal volatility.
Custom SMA: It calculates an average range of the last N bars, but it smartly excludes "anomalous" bars (spikes or unusually small ranges) from the calculation. This gives you a more reliable baseline for normal volatility.
Anomaly Detection: Bars are colored differently based on their range:
Blue: Small anomalies (range less than 0.5 * ATR). These often occur during periods of low liquidity or indecision.
Red: Large anomalies (range greater than 1.8 * ATR). These can signal a sudden burst of volatility, breakout events, or capitulation.
ATR Range % Label: The label on the chart shows the current bar's range as a percentage of the custom SMA. This tells you how much larger or smaller the current bar's range is compared to a clean average.
How to Use:
Spotting Trends: Use the Body % to confirm the strength of a trend. A series of bars with high body percentages can indicate a strong, healthy trend.
Identifying Volatility: Use the Range Analysis to find areas of interest. A large red anomaly bar could signal a significant event, while a series of blue anomalies might suggest the market is in a tight consolidation before a breakout.
Contextual Analysis: The combination of these tools can provide powerful context. For example, a bar with a high Body % and a red anomaly color suggests a strong, volatile move that could be a turning point or the start of a major trend.
Experiment with the input settings to fine-tune the ATR and SMA periods for different timeframes and assets.
This indicator provides a dual analysis of price bars to help you better understand market dynamics and volatility. It combines two powerful concepts into one tool: a candle body percentage and a range analysis with an anomaly-excluding average.
Key Features:
1. Candle Body Percentage
This feature plots the size of the candle's body as a percentage of its total high-low range.
A high percentage (e.g., above the 50% gray line) indicates strong, directional movement. The more solid the body is relative to its wicks, the more conviction is behind that move.
The 100% red line marks "Marubozu" candles—bars with no wicks, showing absolute control by buyers or sellers.
2. Range Analysis with Anomalies
This is a unique part of the indicator that helps you identify and understand normal vs. abnormal volatility.
Custom SMA: It calculates an average range of the last N bars, but it smartly excludes "anomalous" bars (spikes or unusually small ranges) from the calculation. This gives you a more reliable baseline for normal volatility.
Anomaly Detection: Bars are colored differently based on their range:
Blue: Small anomalies (range less than 0.5 * ATR). These often occur during periods of low liquidity or indecision.
Red: Large anomalies (range greater than 1.8 * ATR). These can signal a sudden burst of volatility, breakout events, or capitulation.
ATR Range % Label: The label on the chart shows the current bar's range as a percentage of the custom SMA. This tells you how much larger or smaller the current bar's range is compared to a clean average.
How to Use:
Spotting Trends: Use the Body % to confirm the strength of a trend. A series of bars with high body percentages can indicate a strong, healthy trend.
Identifying Volatility: Use the Range Analysis to find areas of interest. A large red anomaly bar could signal a significant event, while a series of blue anomalies might suggest the market is in a tight consolidation before a breakout.
Contextual Analysis: The combination of these tools can provide powerful context. For example, a bar with a high Body % and a red anomaly color suggests a strong, volatile move that could be a turning point or the start of a major trend.
Experiment with the input settings to fine-tune the ATR and SMA periods for different timeframes and assets.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。