OPEN-SOURCE SCRIPT
Aggiornato Ehlers Dominant Cycle Stochastic RSI v2

Ehlers Dominant Cycle Stochastic RSI
Summary
An adaptive Stochastic RSI whose lengths are set by the market's measured dominant cycle rather than by a fixed input. The indicator continuously estimates the dominant cycle period in price and feeds that period directly into the RSI and Stochastic calculations, so the oscillator's lookback adjusts as the underlying cycle shortens or lengthens across symbols and timeframes.
The Inspiration — John Ehlers
The indicator is built on the digital signal processing work of John Ehlers, who treated price as a waveform and applied engineering filters to extract its underlying cycle. Rather than rely on a single cycle estimate, it runs three independent measurement methods in parallel:
Before measurement, price is conditioned with Ehlers' filter set: a Super Smoother filter, a Highpass filter to remove the trend (DC) component, and an optional Bandpass "spectral dilation" pre-filter to isolate the cycle band. The three estimates are then cross-checked. When they agree, their values are blended into a single confirmed period; when they diverge, outliers are down-weighted before the result is smoothed.
Features
Summary
An adaptive Stochastic RSI whose lengths are set by the market's measured dominant cycle rather than by a fixed input. The indicator continuously estimates the dominant cycle period in price and feeds that period directly into the RSI and Stochastic calculations, so the oscillator's lookback adjusts as the underlying cycle shortens or lengthens across symbols and timeframes.
The Inspiration — John Ehlers
The indicator is built on the digital signal processing work of John Ehlers, who treated price as a waveform and applied engineering filters to extract its underlying cycle. Rather than rely on a single cycle estimate, it runs three independent measurement methods in parallel:
- Hilbert Transform homodyne discriminator — Ehlers' classic dominant-cycle estimator
- Autocorrelation Periodogram — Pearson correlation across lags to identify the repeating period
- Goertzel / DFT power spectrum — a frequency-domain scan for the strongest cycle
Before measurement, price is conditioned with Ehlers' filter set: a Super Smoother filter, a Highpass filter to remove the trend (DC) component, and an optional Bandpass "spectral dilation" pre-filter to isolate the cycle band. The three estimates are then cross-checked. When they agree, their values are blended into a single confirmed period; when they diverge, outliers are down-weighted before the result is smoothed.
Features
- Triple cycle detection with confirmation — Hilbert, Autocorrelation, and DFT run together, with a 0–100% confidence score reflecting how closely they agree
- Confidence-weighted period blending — each method is weighted by agreement and correlation strength, then smoothed into one cycle period
- Adaptive RSI & Stochastic lengths — both derive from the detected cycle, with independent multipliers (e.g. 0.5× for half-cycle, 1.0× for full-cycle)
- Spectral dilation pre-filter — optional bandpass with adjustable bandwidth for tighter cycle isolation
- Momentum histogram — normalized K−D centered on the midline, with bars that fade as momentum stalls
- OB/OS zone shading
- Performance controls — recalc interval and DFT window settings to manage the spectral scans
Note di rilascio
Performance Mode added Users can now select one single cycle detection method (Hilbert, Autocorrelation, or DFT) rather than having all three running together.
This new mode will help if you're having issues with the indicator loading or want to select a specific cycle method.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
discord.gg/REapC6SGtz
b3artrades@gmail.com
b3artrades@gmail.com
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
discord.gg/REapC6SGtz
b3artrades@gmail.com
b3artrades@gmail.com
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.