OPEN-SOURCE SCRIPT

Schumann Spectrum Dynamic RSI

612
Schumann Spectrum Dynamic RSI
An adaptive RSI oscillator that draws inspiration from Earth's Schumann electromagnetic resonances to dynamically shift its calculation period based on real-time market efficiency. The indicator measures price "resonance" — the ratio of net displacement to total path traveled — and automatically locks onto the harmonic frequency that best matches current market energy, from the fast fundamental cavity to the slow fifth harmonic.
What It Does
The Schumann RSI replaces the traditional fixed RSI length with a spectrum of five harmonic periods derived from the Schumann resonance frequencies (7.83 Hz, 14.3 Hz, 20.8 Hz, 27.3 Hz, 33.8 Hz). Rather than displaying all five oscillators simultaneously, it calculates a Market Resonance score and dynamically selects the single most appropriate harmonic for the current regime:
  • High Resonance (>0.60): Market is moving efficiently with minimal noise. The indicator locks onto the Fundamental frequency (~8 bars) for fast, responsive momentum readings.
  • Moderate-High Resonance (0.45–0.60): Market shows directional character with some chop. The 2nd Harmonic (~14 bars) provides balanced smoothing.
  • Moderate Resonance (0.30–0.45): Market is mixed. The 3rd Harmonic (~21 bars) filters out increasing noise.
  • Low Resonance (0.15–0.30): Market is noisy and inefficient. The 4th Harmonic (~27 bars) applies heavy smoothing.
  • Very Low Resonance (<0.15): Market is in maximum entropy/random walk. The 5th Harmonic (~34 bars) captures only the slowest, most dominant cyclical component.

Core Components
  • Custom RSI Engine: Uses Wilder's RMA smoothing on upward/downward price changes, calculated independently across all five harmonic lengths every bar.
  • Market Resonance (Signal-to-Noise): Computed as net travel divided by total travel over the maximum cavity window (~34 bars). Net travel = |close − close[34]|. Total travel = Σ|close − close[i+1]|. A ratio near 1.0 means price moved directly to its destination (trending); near 0.0 means price wandered randomly (choppy).
    *Electromagnetic Cavity Analogy: Just as Earth's ionospheric cavity resonates at specific frequencies, this indicator treats the market as a resonant cavity where different wave lengths dominate depending on energy input. High energy (strong trends) excites the fundamental; low energy (chop) excites higher harmonics.
    *Dynamic Background Tinting: The chart background changes color to indicate which harmonic is actively driving the RSI line — blue for fundamental, purple for 2nd, red for 3rd, orange for 4th, yellow for 5th.

How to Read It
  • The White RSI Line: The dynamically selected RSI value (0–100). Because the lookback period changes bar-to-bar, the line adapts its responsiveness automatically — tight and fast in trending markets, smooth and stable in ranging markets.
  • Background Colors:
    • Blue: Locked onto Fundamental (~8) — expect sharp, rapid reversals at 30/70. Momentum signals are immediate but can whip.
    • Purple: Locked onto 2nd Harmonic (~14) — balanced sensitivity. Standard RSI behavior.
    • Red: Locked onto 3rd Harmonic (~21) — moderate lag. Better for swing entries, ignores minor pullbacks.
    • Orange: Locked onto 4th Harmonic (~27) — significant lag. Use for position trading; overbought/oversold signals are rare but high-conviction.
    • Yellow: Locked onto 5th Harmonic (~34) — maximum smoothing. Only extreme divergences and major regime shifts are visible.
  • Threshold Lines:
    • 70 (Red Dashed): Overbought — consider profit-taking or shorts when RSI approaches from below, especially on blue/purple backgrounds.
    • 30 (Green Dashed): Oversold — consider accumulation or longs when RSI approaches from above.
    • 50 (Grey Dotted): Equilibrium — the zero-momentum line. Crosses above/below indicate bullish/bearish momentum shifts.

Practical Usage Guidelines
Trend Identification
  • When the background is blue and RSI holds above 50, the market is in a strong, efficient uptrend. Treat pullbacks to 50 as buying opportunities.
  • When the background shifts from blue → purple → red while RSI remains above 70, momentum is persistently overbought but the market is becoming noisier — tighten stops.

Reversal Trading
  • Blue/Purple backgrounds: Trade standard RSI reversals — buy near 30, sell near 70. The fast harmonic makes these levels reactive.
  • Orange/Yellow backgrounds: RSI extremes are rarer and more significant. A reading above 70 in yellow indicates an extended, long-duration overbought condition — higher probability reversal.

Regime Transition Filtering
  • Use background color transitions as early warnings. A shift from blue to red means the market is losing directional efficiency — reduce position size or switch to range-bound strategies.
  • A shift from yellow to blue indicates a sudden burst of directional energy — breakouts and trend initiations are more trustworthy.

Divergence Analysis
  • Because the RSI length adapts, traditional divergence analysis requires context. A bearish divergence on a blue background (fast RSI) is less reliable than one on a red/orange background where the oscillator has been smoothed over many bars.
  • Wait for the background to stabilize (2–3 bars same color) before trusting divergence signals.

Important Notes
  • Hardcoded Harmonics: The five frequencies are fixed at 7.83, 14.3, 20.8, 27.3, and 33.9 bars (displayed as 8, 14, 21, 27, 34). These map to the Earth's Schumann resonances and are not user-configurable in this version.
  • Resonance Calculation: The efficiency ratio uses the maximum window (f5, ~34 bars) as the denominator period. This means the resonance score has memory — it reflects the efficiency of the last ~34 bars, not just the current bar.
  • Dynamic Switching Behavior: The indicator selects the harmonic using a cascading if-else ladder (0.6 → 0.45 → 0.3 → 0.15). There is no interpolation between harmonics; it jumps directly from one RSI period to another. This can create small discontinuities in the line when resonance crosses a threshold.
  • RMA vs SMA: The custom RSI uses ta.rma2 (Wilder's smoothing) rather than standard SMA, giving more weight to recent bars within each harmonic window. This is mathematically identical to classic RSI.
  • No Repainting: All calculations use confirmed close prices and historical bar offsets. The resonance score and harmonic selection are determined at bar close and do not shift retrospectively.
  • Color Intensity: Background colors use 90% transparency to avoid obscuring price action. The active harmonic is readable at a glance without dominating the chart.
  • Net Travel Guard: If total travel equals zero (perfectly flat market over 34 bars), resonance defaults to 0.0 and the indicator selects the 5th harmonic to avoid division errors.

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。