OPEN-SOURCE SCRIPT
Z-Score Indicator

This script calculates the Z-Score to measure how many standard deviations the current price is from its mean (SMA). It is a classic tool for identifying statistical extremes and mean reversion opportunities.
Formula Z = (Close - Mean) / Standard Deviation
Visual Guide
Blue Line: The Z-Score value.
Red Dotted Lines (+/- 2): Statistical extremes.
> 2: Potentially Overbought.
< -2: Potentially Oversold.
Grey Dotted Line (0): The mean (fair value).
Settings
Lookback Period: Default is 30. Adjust to change sensitivity.
Formula Z = (Close - Mean) / Standard Deviation
Visual Guide
Blue Line: The Z-Score value.
Red Dotted Lines (+/- 2): Statistical extremes.
> 2: Potentially Overbought.
< -2: Potentially Oversold.
Grey Dotted Line (0): The mean (fair value).
Settings
Lookback Period: Default is 30. Adjust to change sensitivity.
Script de código abierto
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.
Exención de responsabilidad
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.
Script de código abierto
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.
Exención de responsabilidad
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.