OPEN-SOURCE SCRIPT
Updated Normalized Dist from 4H MA200 + Chart Highlights

Normalized Distance from 4H EMA200 + Highlighting Extremes
This indicator measures the distance between the current price and the 4-hour EMA200, normalized into a z-score to detect statistically significant deviations.
🔹 The lower pane shows the normalized z-score.
🔹 Green background = price far below EMA200 (z < -2).
🔹 Red background = price far above EMA200 (z > 3.1).
🔹 These thresholds are user-configurable.
🔹 On the main chart:
🟥 Red candles indicate overheated prices (z > upper threshold)
🟩 Green candles signal oversold conditions (z < lower threshold)
The EMA200 is always taken from a fixed 4H timeframe, regardless of your current chart resolution.
This indicator measures the distance between the current price and the 4-hour EMA200, normalized into a z-score to detect statistically significant deviations.
🔹 The lower pane shows the normalized z-score.
🔹 Green background = price far below EMA200 (z < -2).
🔹 Red background = price far above EMA200 (z > 3.1).
🔹 These thresholds are user-configurable.
🔹 On the main chart:
🟥 Red candles indicate overheated prices (z > upper threshold)
🟩 Green candles signal oversold conditions (z < lower threshold)
The EMA200 is always taken from a fixed 4H timeframe, regardless of your current chart resolution.
Release Notes
Normalized Distance from 4H EMA200 + Highlighting ExtremesThis indicator measures the distance between the current price and the 4-hour EMA200, normalized into a z-score to detect statistically significant deviations.
🔹 The lower pane shows the normalized z-score.
🔹 Green background = price far below EMA200 (z < -2).
🔹 Red background = price far above EMA200 (z > 3.1).
🔹 These thresholds are user-configurable.
🔹 On the main chart:
🟥 Red candles indicate overheated prices (z > upper threshold)
🟩 Green candles signal oversold conditions (z < lower threshold)
The EMA200 is always taken from a fixed 4H timeframe, regardless of your current chart resolution.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.