Dual-Phase Trend Regime Strategy [Zeiierman X PineIndicators]

Full credit for the original concept and logic goes to Zeiierman.
This non-repainting strategy dynamically switches between fast and slow oscillators based on market volatility, providing adaptive entries and exits with high clarity and reliability.
Core Concepts
1. Adaptive Dual Oscillator Logic
The system uses two oscillators:
- Fast Oscillator: Activated in high-volatility phases for quick reaction.
- Slow Oscillator: Used during low-volatility phases to reduce noise.
The system automatically selects the appropriate oscillator depending on the market's volatility regime.
2. Volatility Regime Detection
Volatility is calculated using the standard deviation of returns. A median-split algorithm clusters volatility into:
- Low Volatility Cluster
- High Volatility Cluster
The current volatility is then compared to these clusters to determine whether the regime is low or high volatility.
3. Trend Regime Identification
Based on the active oscillator:
- Bullish Trend: Oscillator > 0.5
- Bearish Trend: Oscillator < 0.5
- Neutral Trend: Oscillator = 0.5
The strategy reacts to changes in this trend regime.
4. Signal Source Options
You can choose between:
- Regime Shift (Arrows): Trade based on oscillator value changes (from bullish to bearish and vice versa).
- Oscillator Cross: Trade based on crossovers between the fast and slow oscillators.
Trade Logic
Trade Direction Options
- Long Only
- Short Only
- Long & Short
Entry Conditions
- Long Entry: Triggered on bullish regime shift or fast crossing above slow.
- Short Entry: Triggered on bearish regime shift or fast crossing below slow.
Exit Conditions
- Long Exit: Triggered on bearish shift or fast crossing below slow.
- Short Exit: Triggered on bullish shift or fast crossing above slow.
The strategy closes opposing positions before opening new ones.
Visual Features
- Oscillator Bands: Plots fast and slow oscillators, colored by trend.
- Background Highlight: Indicates current trend regime.
- Signal Markers: Triangle shapes show bullish/bearish shifts.
- Dashboard Table: Displays live trend status ("Bullish", "Bearish", "Neutral") in the chart’s corner.
Inputs & Customization
- Oscillator Periods – Fast and slow lengths.
- Refit Interval – How often volatility clusters update.
- Volatility Lookback & Smoothing
- Color Settings – Choose your own bullish/bearish colors.
- Signal Mode – Regime shift or oscillator crossover.
- Trade Direction Mode
Use Cases
- Swing Trading: Take entries based on adaptive regime shifts.
- Trend Following: Follow the active trend using filtered oscillator logic.
- Volatility-Responsive Systems: Adjust your trade behavior depending on market volatility.
- Clean Exit Management: Automatically closes positions on opposite signal.
Conclusion
The Dual-Phase Trend Regime Strategy is a smart, adaptive, non-repainting system that:
- Automatically switches between fast and slow trend logic.
- Responds dynamically to changes in volatility.
- Provides clean and visual entry/exit signals.
- Supports both momentum and reversal trading logic.
This strategy is ideal for traders seeking a volatility-aware, trend-sensitive tool across any market or timeframe.
Full credit to Zeiierman.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.
Declinazione di responsabilità
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.