PROTECTED SOURCE SCRIPT
Quant Master Z-Oscillator [Risk + Bias]

his indicator is a statistically-driven oscillator designed to measure the extreme deviation of price from its recent mean, identifying both reversal risk and directional bias within the current trend. It reframes classic Z-Score analysis to provide a quantified framework for trade timing and risk assessment.
Core Philosophy
The primary goal is to determine the statistical probability of a mean-reversion event. By measuring how many standard deviations the current price is away from its simple moving average (the basis), the indicator identifies moments of maximum risk (Extremes) and optimal entry (Oversold/Overbought zones).
Key Components
Z-Score Calculation:
Measures the distance of the closing price from the Lookback Length Simple Moving Average (SMA), normalized by the Standard Deviation (Volatility).
The raw score is then smoothed using an Exponential Moving Average (EMA) to filter noise, providing a clearer reading of the underlying statistical position.
Statistical Thresholds:
$\pm 2\sigma$ (High/Low): Defines the standard Overbought/Oversold zones (Trigger Zones). Movement into these areas suggests a pullback or reversal is increasingly likely.
$\pm 3\sigma$ (Extreme): Defines the "Kill Zone" of maximum statistical risk. Price reaching this level is highly unlikely to sustain itself, triggering an Extreme Overbought/Oversold warning.
Risk & Bias Dashboard (Table):
A real-time dashboard displayed on the chart (bottom right) provides a quantified summary of the current market state:
Current Z: The exact Z-Score value and its gradient color (green for positive pressure, red for negative).
Market Risk: Flags the statistical risk (e.g., OVERBOUGHT or EXTREME OVERSOLD ⚠️) based on the $\sigma$ thresholds.
Next Bias: Suggests the immediate directional bias (e.g., LONG SETUP NEXT or SHORT REVERSAL), helping the user prepare for the next high-probability setup based on the Z-Score's position relative to the mean.
Divergence Engine:
Detects standard Bullish and Bearish divergences between the Z-Score and the price action, signaling potential trend exhaustion or hidden momentum shifts.
Interpretation & Use
Risk Management: Treat the $\pm 3\sigma$ (Extreme) levels as mandatory profit-taking or high-alert reversal zones. Trading against these extremes carries the highest statistical risk.
Entry Timing: High-probability entries are found when the Z-Score is at $\pm 2\sigma$ (Oversold/Overbought) and a momentum shift (e.g., a green bar after an Oversold red sequence) is observed.
Trend Confirmation: When the Z-Score operates between $0$ and $\pm 2\sigma$, it confirms the direction of the current trend (Positive Z-Score = Bullish bias).
Core Philosophy
The primary goal is to determine the statistical probability of a mean-reversion event. By measuring how many standard deviations the current price is away from its simple moving average (the basis), the indicator identifies moments of maximum risk (Extremes) and optimal entry (Oversold/Overbought zones).
Key Components
Z-Score Calculation:
Measures the distance of the closing price from the Lookback Length Simple Moving Average (SMA), normalized by the Standard Deviation (Volatility).
The raw score is then smoothed using an Exponential Moving Average (EMA) to filter noise, providing a clearer reading of the underlying statistical position.
Statistical Thresholds:
$\pm 2\sigma$ (High/Low): Defines the standard Overbought/Oversold zones (Trigger Zones). Movement into these areas suggests a pullback or reversal is increasingly likely.
$\pm 3\sigma$ (Extreme): Defines the "Kill Zone" of maximum statistical risk. Price reaching this level is highly unlikely to sustain itself, triggering an Extreme Overbought/Oversold warning.
Risk & Bias Dashboard (Table):
A real-time dashboard displayed on the chart (bottom right) provides a quantified summary of the current market state:
Current Z: The exact Z-Score value and its gradient color (green for positive pressure, red for negative).
Market Risk: Flags the statistical risk (e.g., OVERBOUGHT or EXTREME OVERSOLD ⚠️) based on the $\sigma$ thresholds.
Next Bias: Suggests the immediate directional bias (e.g., LONG SETUP NEXT or SHORT REVERSAL), helping the user prepare for the next high-probability setup based on the Z-Score's position relative to the mean.
Divergence Engine:
Detects standard Bullish and Bearish divergences between the Z-Score and the price action, signaling potential trend exhaustion or hidden momentum shifts.
Interpretation & Use
Risk Management: Treat the $\pm 3\sigma$ (Extreme) levels as mandatory profit-taking or high-alert reversal zones. Trading against these extremes carries the highest statistical risk.
Entry Timing: High-probability entries are found when the Z-Score is at $\pm 2\sigma$ (Oversold/Overbought) and a momentum shift (e.g., a green bar after an Oversold red sequence) is observed.
Trend Confirmation: When the Z-Score operates between $0$ and $\pm 2\sigma$, it confirms the direction of the current trend (Positive Z-Score = Bullish bias).
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由使用,沒有任何限制 — 點擊此處了解更多。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由使用,沒有任何限制 — 點擊此處了解更多。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。