OPEN-SOURCE SCRIPT
Cycle Forecast + MACD Divergence (Kombi v6 FULL)

This indicator merges two powerful analytical models:
🔮 1. Dominant Cycle Forecasting
The script automatically identifies major structural market cycles by detecting significant swing highs and lows.
It then fits a sinusoidal wave (amplitude, phase, and period) to the dominant cycle and projects it into the future.
Features:
Automatically extracts large, dominant cycles (no noise, no small swings)
Smooth sinusoidal historical cycle visualization
Future cycle projection for 1–2 upcoming cycle periods
Dynamic amplitude and phase alignment based on market structure
Helps anticipate cycle tops and bottoms for long-term timing
📉 2. MACD Divergence Detection
Full divergence detection engine using MACD or MACD Histogram.
Detects:
Bullish Divergence
Price ↓ while MACD (or Histogram) ↑
→ Possible trend reversal upward
Bearish Divergence
Price ↑ while MACD (or Histogram) ↓
→ Possible trend reversal downward
Features:
Pivot-based divergence confirmation (no repaint)
Choice of MACD Line or Histogram as divergence source
Labels + connecting divergence lines
Works across all markets and timeframes
⚙️ Smart Auto-Pivot System
The indicator optionally adjusts pivot sensitivity based on timeframe:
Weekly → tighter pivots
Daily → medium pivots
Intraday → wider pivots
Ensures stable, meaningful divergence signals even on higher timeframes.
🎯 Use cases
Identify upcoming cycle highs/lows
Spot major trend reversals early
Improve swing entries with MACD divergences near cycle turns
Combine forecasting with momentum exhaustion
Suitable for crypto, stocks, indices, forex & commodities
🧠 Why this indicator is powerful
This tool blends time-based cycle forecasting with momentum-based divergence signals, giving you a unique perspective of where the market is likely to turn.
Cycles reveal when a move may occur.
Divergences reveal why a move may occur.
Combined, they offer highly effective market timing.
🔮 1. Dominant Cycle Forecasting
The script automatically identifies major structural market cycles by detecting significant swing highs and lows.
It then fits a sinusoidal wave (amplitude, phase, and period) to the dominant cycle and projects it into the future.
Features:
Automatically extracts large, dominant cycles (no noise, no small swings)
Smooth sinusoidal historical cycle visualization
Future cycle projection for 1–2 upcoming cycle periods
Dynamic amplitude and phase alignment based on market structure
Helps anticipate cycle tops and bottoms for long-term timing
📉 2. MACD Divergence Detection
Full divergence detection engine using MACD or MACD Histogram.
Detects:
Bullish Divergence
Price ↓ while MACD (or Histogram) ↑
→ Possible trend reversal upward
Bearish Divergence
Price ↑ while MACD (or Histogram) ↓
→ Possible trend reversal downward
Features:
Pivot-based divergence confirmation (no repaint)
Choice of MACD Line or Histogram as divergence source
Labels + connecting divergence lines
Works across all markets and timeframes
⚙️ Smart Auto-Pivot System
The indicator optionally adjusts pivot sensitivity based on timeframe:
Weekly → tighter pivots
Daily → medium pivots
Intraday → wider pivots
Ensures stable, meaningful divergence signals even on higher timeframes.
🎯 Use cases
Identify upcoming cycle highs/lows
Spot major trend reversals early
Improve swing entries with MACD divergences near cycle turns
Combine forecasting with momentum exhaustion
Suitable for crypto, stocks, indices, forex & commodities
🧠 Why this indicator is powerful
This tool blends time-based cycle forecasting with momentum-based divergence signals, giving you a unique perspective of where the market is likely to turn.
Cycles reveal when a move may occur.
Divergences reveal why a move may occur.
Combined, they offer highly effective market timing.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.