OPEN-SOURCE SCRIPT
업데이트됨 Z'-Score Histogram

WHAT IT DOES:
The Z'-Score Histogram is a volatility-adjusted momentum oscillator that quantifies how far the current asset price has deviated from its historical average. By calculating the standard deviation of price movement over a user-defined lookback period, it translates raw price action into clear statistical units. Instead of relying on the arbitrary overbought or oversold boundaries found in standard indicators like RSI, this script shows exactly how many standard deviations the current price is away from the mean, plotting the data as a clean, real-time histogram.
WHY IT IS USEFUL:
Standard bounded indicators can flatten out or bake at extreme levels during strong, prolonged trends. The Z'-Score Histogram solves this by using an unbounded statistical scale. This approach allows traders to instantly spot statistically significant anomalies, since a move beyond positive or negative three standard deviations happens less than one percent of the time in a normal distribution. It helps traders quickly identify whether an asset is in a sustainable trend or if it has stretched too far and is ripe for a mean-reversion snapback.
HOW IT ADDS VALUE TO THE COMMUNITY:
This script adds value to the community by bridging the gap between complex statistical trading and clean, modern chart aesthetics. Many public Z-score tools are either overly bare-bones or cluttered with heavy UI elements. This version delivers professional statistical data in a highly readable, actionable format without lagging or cluttering the workspace.
WHY THIS SCRIPT IS UNIQUE:
Several features make this script unique from others in the public library:
- Dual-Engine Filtering: Most scripts force you into a Simple Moving Average baseline. This version gives you a toggle to use an Exponential Moving Average instead, allowing the Z-score to react faster to sudden, high-volatility regime shifts.
- Dynamic Regime Classification Engine: The script automatically categorizes market states into six distinct, logical phases based on statistical probability, ranging from oversold and hostile to neutral, strong, and overbought.
- Ultra-Clean Dashboard Panel: Instead of a bulky table that blocks price action, it features a lightweight, floating text HUD in the top right. The background is borderless and transparent, adapting seamlessly to any chart theme.
- Visual Extreme Value Highlights: The histogram instantly shifts to high-contrast signature colors only when the market hits the statistically rare three standard deviation thresholds, immediately alerting you to extreme market exhaustion.
DISCLAIMER:
The author has made every effort to ensure the underlying mathematics and logic in this script are correct. However, trading involves substantial risk. If, for example, you buy an asset simply because it registers as oversold on this indicator, and it proceeds to become even more oversold while your position goes against you, that is entirely on you. This tool is for informational and educational purposes only, not financial or execution advice. Use proper risk management and trade at your own discretion.
The Z'-Score Histogram is a volatility-adjusted momentum oscillator that quantifies how far the current asset price has deviated from its historical average. By calculating the standard deviation of price movement over a user-defined lookback period, it translates raw price action into clear statistical units. Instead of relying on the arbitrary overbought or oversold boundaries found in standard indicators like RSI, this script shows exactly how many standard deviations the current price is away from the mean, plotting the data as a clean, real-time histogram.
WHY IT IS USEFUL:
Standard bounded indicators can flatten out or bake at extreme levels during strong, prolonged trends. The Z'-Score Histogram solves this by using an unbounded statistical scale. This approach allows traders to instantly spot statistically significant anomalies, since a move beyond positive or negative three standard deviations happens less than one percent of the time in a normal distribution. It helps traders quickly identify whether an asset is in a sustainable trend or if it has stretched too far and is ripe for a mean-reversion snapback.
HOW IT ADDS VALUE TO THE COMMUNITY:
This script adds value to the community by bridging the gap between complex statistical trading and clean, modern chart aesthetics. Many public Z-score tools are either overly bare-bones or cluttered with heavy UI elements. This version delivers professional statistical data in a highly readable, actionable format without lagging or cluttering the workspace.
WHY THIS SCRIPT IS UNIQUE:
Several features make this script unique from others in the public library:
- Dual-Engine Filtering: Most scripts force you into a Simple Moving Average baseline. This version gives you a toggle to use an Exponential Moving Average instead, allowing the Z-score to react faster to sudden, high-volatility regime shifts.
- Dynamic Regime Classification Engine: The script automatically categorizes market states into six distinct, logical phases based on statistical probability, ranging from oversold and hostile to neutral, strong, and overbought.
- Ultra-Clean Dashboard Panel: Instead of a bulky table that blocks price action, it features a lightweight, floating text HUD in the top right. The background is borderless and transparent, adapting seamlessly to any chart theme.
- Visual Extreme Value Highlights: The histogram instantly shifts to high-contrast signature colors only when the market hits the statistically rare three standard deviation thresholds, immediately alerting you to extreme market exhaustion.
DISCLAIMER:
The author has made every effort to ensure the underlying mathematics and logic in this script are correct. However, trading involves substantial risk. If, for example, you buy an asset simply because it registers as oversold on this indicator, and it proceeds to become even more oversold while your position goes against you, that is entirely on you. This tool is for informational and educational purposes only, not financial or execution advice. Use proper risk management and trade at your own discretion.
릴리즈 노트
Added better option highlight colors to highlight sweet spots of trends (Z' = 1 to 3)Added optional divergence lines
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.