OPEN-SOURCE SCRIPT
Güncellendi

Williams %R Jaggedness fix

640
[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.
Sürüm Notları
new features
Sürüm Notları
2 new

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.