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.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.