OPEN-SOURCE SCRIPT
Updated Mean Reversion Probability

Mean Reversion Probability (MRP) measures how far price has stretched from its 50-period moving average using a Z-score. It tells you when a market is statistically overextended and likely to snap back.
Z-Score Zones:
• Above +3 → Extreme Overbought
• Above +2 → Overbought
• Below -2 → Oversold
• Below -3 → Extreme Oversold
The line changes color dynamically based on the zone it's in, with filled bands making each zone instantly readable at a glance.
The info panel shows the live Z-score, SMA50, standard deviation, how far price is from the mean in both price and percentage, current zone, and directional bias.
Best used on higher timeframes (1H, 4H, Daily) as a mean reversion confluence tool, not a standalone signal. Works well combined with momentum or volume indicators to confirm entries.
Z-Score Zones:
• Above +3 → Extreme Overbought
• Above +2 → Overbought
• Below -2 → Oversold
• Below -3 → Extreme Oversold
The line changes color dynamically based on the zone it's in, with filled bands making each zone instantly readable at a glance.
The info panel shows the live Z-score, SMA50, standard deviation, how far price is from the mean in both price and percentage, current zone, and directional bias.
Best used on higher timeframes (1H, 4H, Daily) as a mean reversion confluence tool, not a standalone signal. Works well combined with momentum or volume indicators to confirm entries.
Release Notes
added sma length change inputOpen-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.