OPEN-SOURCE SCRIPT

RSI Z-score | Lemniscuss

556
๐Ÿง  Introducing RSI Z-Score (RSI-Z) by Lemniscuss

๐Ÿ› ๏ธ Overview
RSI Z-Score (RSI-Z) is a momentum-based market condition detector that transforms the classic Relative Strength Index (RSI) into a standardized volatility framework.
By applying Z-Score normalization to the RSI, this tool allows traders to identify statistically significant deviations in momentum โ€” cutting through noise and highlighting high-probability turning points.

RSI-Z is optimized for trend inflection detection and overextension spotting, providing both visual clarity and actionable trade signals with dynamic labeling and optional bar coloring.

๐Ÿ” How It Works
1๏ธโƒฃ RSI Foundation
The system starts with a standard RSI calculation on a user-defined source and length (default: 45).
2๏ธโƒฃ Z-Score Normalization
The RSI values are standardized by subtracting their mean and dividing by the standard deviation over the same lookback.
This converts RSI into a statistical measure โ€” revealing how many standard deviations current momentum is from its mean.
3๏ธโƒฃ Threshold Logic
Two customizable thresholds define actionable zones:
โ€ข Long Threshold โ†’ Signals bullish momentum shifts when crossed upward
โ€ข Short Threshold โ†’ Signals bearish momentum shifts when crossed downward
4๏ธโƒฃ Signal State Tracking
A state variable locks in a bias (Long / Short / Neutral) until an opposing trigger appears, ensuring clear and consistent market bias mapping.

โœจ Key Features
๐Ÿ”น Statistically Driven Momentum Detection โ€” Moves beyond fixed RSI overbought/oversold levels by using standard deviations for adaptive accuracy.
๐Ÿ”น Customizable Thresholds โ€” Fine-tune long/short triggers for different volatility environments.
๐Ÿ”น Clear Visual Feedback โ€” Candle coloring and signal labels make trade setups instantly recognizable.
๐Ÿ”น Overlay-Friendly โ€” Works directly on your main chart or in a separate pane.

โš™๏ธ Custom Settings
โ€ข Source: Price stream for RSI calculation (default: close)
โ€ข RSI Length: Lookback period for RSI & Z-Score (default: 45)
โ€ข Long Threshold: Z-score value for bullish signal (default: 1)
โ€ข Short Threshold: Z-score value for bearish signal (default: -1.9)
โ€ข Long/Cash Signal Labels: Toggle for "Long"/"Short" markers
โ€ข Bar Coloring: Toggle for trend-based candle coloring

๐Ÿ“Œ Trading Applications
โœ… Trend Reversals โ†’ Spot statistically significant shifts in momentum before traditional RSI signals trigger
โœ… Overextension Monitoring โ†’ Identify when momentum has deviated too far from the mean
โœ… Mean Reversion Setups โ†’ Use extreme Z-score values as potential reversion points
โœ… Bias Confirmation โ†’ Combine with trend tools for higher conviction entries/exits

๐Ÿ“Œ Conclusion
RSI-Z by Lemniscuss offers a clean, statistics-backed upgrade to the classic RSI.
By framing momentum in standard deviation terms, it empowers traders to separate normal fluctuations from truly significant market moves โ€” making it a valuable tool for both trend traders and mean reversion specialists.

๐Ÿ”น Summary Highlights
1๏ธโƒฃ Statistical upgrade to RSI for higher-quality signals
2๏ธโƒฃ Threshold-based, customizable long/short triggers
3๏ธโƒฃ Visual candle coloring & signal labels for clarity
4๏ธโƒฃ Adaptable to trend, swing, or intraday strategies

๐Ÿ“Œ Disclaimer: Past performance is not indicative of future results. No indicator guarantees profitability โ€” always test and manage risk appropriately.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.