OPEN-SOURCE SCRIPT
已更新 Williams %R Jaggedness fix

[I. THE PROBLEM OF RETAIL JAGGEDNESS]
The standard Williams %R is extremely jagged. Relying on a naive (Highest - Close) / (Highest - Lowest) look-back formula makes it a victim of spatial illusion. It is highly vulnerable to "salt-and-pepper" noise, intraday microstructure stop-hunts, and high-frequency volatility spikes. It generates an erratic, jagged signal that triggers false regime shifts, trapping retail liquidity.
[II. THE MULTI-STAGE SOLUTION] Solving the jaggedness problem is not about applying a single, lagging moving average. It requires a continuous-time signal processing pipeline. I developed 4, sovereign hypotheses to isolate the true kinematic intent of the market.
► HYPOTHESIS I: The Robust Nonlinear Butterworth %R (RNB-R)
The Mechanism: Amplitude and Noise Filtering.
The Execution: We cleanse the raw data using a 3-period Median Filter to instantly reject 1-bar liquidity sweeps without introducing lag. The resulting %R is then dynamically smoothed via a Volatility-Adaptive SuperSmoother. The lookback adapts kinematically—tightening during explosive volatility to capture breakouts, and expanding during consolidation to ignore chop.
► HYPOTHESIS II: The Decycled Zero-Lag Cycle Oscillator (DZL-R)
The Mechanism: Frequency Cancellation.
The Execution: We abandon the concept of "averaging" entirely. Using a 48-bar High-Pass filter, we isolate and subtract the high-frequency spectral noise directly from the price (Decycling). By mapping the Williams %R onto this Decycled Price, we produce a zero-lag, wave-like signal that perfectly reflects pure trend movement while ignoring micro-structural noise.
► HYPOTHESIS III: The IMF-Extracted Persistent Shape Wave (IMF-W)
The Mechanism: Spectral Shape Fitting & Empirical Mode Decomposition (EMD).
The Execution: We deconstruct the continuous price manifold into its intrinsic cyclical modes. We discard IMF 1 (high-frequency noise) and the residual (ultra-slow drift). By reconstructing the asset using only IMF 2 and IMF 3, we force the Williams %R to measure purely persistent, rhythmic structural cycles.
► HYPOTHESIS IV: The Bipolar Inverse Fisher Williams %R (BIF-R)
The Mechanism: Probability Distribution Transformation.
The Execution: To maximize state persistence, we smooth the standard oscillator with a 2-pole Gaussian filter, normalize it, and compress it through an Inverse Fisher Transform. This mathematical thermodynamic shift forces the oscillator into a bimodal, polarized state. It snaps quickly between extremes and stays there, eliminating nervous jaggedness in favor of pure regime tokenization.
The standard Williams %R is extremely jagged. Relying on a naive (Highest - Close) / (Highest - Lowest) look-back formula makes it a victim of spatial illusion. It is highly vulnerable to "salt-and-pepper" noise, intraday microstructure stop-hunts, and high-frequency volatility spikes. It generates an erratic, jagged signal that triggers false regime shifts, trapping retail liquidity.
[II. THE MULTI-STAGE SOLUTION] Solving the jaggedness problem is not about applying a single, lagging moving average. It requires a continuous-time signal processing pipeline. I developed 4, sovereign hypotheses to isolate the true kinematic intent of the market.
► HYPOTHESIS I: The Robust Nonlinear Butterworth %R (RNB-R)
The Mechanism: Amplitude and Noise Filtering.
The Execution: We cleanse the raw data using a 3-period Median Filter to instantly reject 1-bar liquidity sweeps without introducing lag. The resulting %R is then dynamically smoothed via a Volatility-Adaptive SuperSmoother. The lookback adapts kinematically—tightening during explosive volatility to capture breakouts, and expanding during consolidation to ignore chop.
► HYPOTHESIS II: The Decycled Zero-Lag Cycle Oscillator (DZL-R)
The Mechanism: Frequency Cancellation.
The Execution: We abandon the concept of "averaging" entirely. Using a 48-bar High-Pass filter, we isolate and subtract the high-frequency spectral noise directly from the price (Decycling). By mapping the Williams %R onto this Decycled Price, we produce a zero-lag, wave-like signal that perfectly reflects pure trend movement while ignoring micro-structural noise.
► HYPOTHESIS III: The IMF-Extracted Persistent Shape Wave (IMF-W)
The Mechanism: Spectral Shape Fitting & Empirical Mode Decomposition (EMD).
The Execution: We deconstruct the continuous price manifold into its intrinsic cyclical modes. We discard IMF 1 (high-frequency noise) and the residual (ultra-slow drift). By reconstructing the asset using only IMF 2 and IMF 3, we force the Williams %R to measure purely persistent, rhythmic structural cycles.
► HYPOTHESIS IV: The Bipolar Inverse Fisher Williams %R (BIF-R)
The Mechanism: Probability Distribution Transformation.
The Execution: To maximize state persistence, we smooth the standard oscillator with a 2-pole Gaussian filter, normalize it, and compress it through an Inverse Fisher Transform. This mathematical thermodynamic shift forces the oscillator into a bimodal, polarized state. It snaps quickly between extremes and stays there, eliminating nervous jaggedness in favor of pure regime tokenization.
發行說明
new features發行說明
2 new開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。