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が提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。