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.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.