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.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.