PROTECTED SOURCE SCRIPT

TDL HMA Concavity Divergence Pro

25
█ **OVERVIEW**

**HMA Divergence Pro** measures the **concavity (curvature)** of the Hull Moving Average — essentially the **second derivative of price momentum**. This mathematical approach detects when momentum is accelerating or decelerating BEFORE traditional indicators confirm.

The core concept: Instead of asking "where is price going?" this indicator asks "is the momentum that's pushing price getting stronger or weaker?"


█ **THE SCIENCE BEHIND IT**

**Second Derivative Analysis**

• Traditional MAs tell you where price IS (position)
• First derivatives (ROC, Momentum) tell you how FAST it's moving (velocity)
• This indicator measures how fast MOMENTUM itself is changing (acceleration)

**The Calculation**
1 — Calculate Hull Moving Average (reduced lag vs SMA/EMA)
2 — Project where HMA should be if current momentum continues unchanged
3 — Measure the difference between actual HMA and projected HMA
4 — Positive divergence = HMA curving upward (bullish acceleration)
5 — Negative divergence = HMA curving downward (bearish acceleration)


█ **VISUAL COMPONENTS**

**The Histogram (4-State Coloring)**

• 🟢 Bright Green — Bullish AND strengthening (best for longs)
• 🟢 Dark Green — Bullish but weakening (momentum fading)
• 🔴 Bright Red — Bearish AND strengthening (best for shorts)
• 🔴 Dark Red — Bearish but weakening (momentum fading)

**Signal Line (Blue)**

9-period EMA of divergence for crossover signals:
• Histogram crosses ABOVE signal line → Bullish momentum building
• Histogram crosses BELOW signal line → Bearish momentum building

**HTF Divergence (Yellow Stepline)**

Shows higher timeframe concavity for multi-timeframe confluence. When both LTF histogram and HTF line are on the same side of zero = MTF alignment.

**Zero Cross Markers**

• 🔵 Cyan dot — Crossed above zero → Bullish momentum shift
• 🟠 Orange dot — Crossed below zero → Bearish momentum shift


█ **SETTINGS GUIDE**

**HMA Settings**
• HMA Length: 34 (default) — Lower = faster/noisier, Higher = smoother/laggier
• Lookback: 2 — Period for rate of change calculation
• Price Source: HL2 recommended for futures

**Multi-Timeframe**
• Enable HTF: Shows higher timeframe divergence as yellow stepline
• HTF Timeframe: 60 (1 hour) works well for 5-15m charts

**Visual Options**
• Display Mode: Histogram (default), Line, or Area
• Show Signal Line: Toggle the blue EMA line
• Show Zero Crosses: Toggle the colored dots
• Fill Background: Subtle red/green background shading


█ **TRADING APPLICATIONS**

**Trend Confirmation**
• Use rising green histogram to confirm long entries
• Use falling red histogram to confirm short entries

**Early Reversal Detection**
• Histogram changing from bright to dark = momentum weakening
• Zero cross often precedes price reversal by 2-5 bars

**Multi-Timeframe Confluence**
• Best signals: LTF and HTF divergence agree
• Avoid: LTF and HTF conflict

**Divergence from Price**
• Price makes new high but histogram makes lower high = bearish divergence
• Price makes new low but histogram makes higher low = bullish divergence


█ **RECOMMENDED SETTINGS**

┌─────────────────┬────────────┬─────────┐
│ Instrument │ HMA Length │ HTF │
├─────────────────┼────────────┼─────────┤
│ NQ/ES Futures │ 21-34 │ 60m │
│ Forex Majors │ 34 │ 240m │
│ Stocks (Swing) │ 55 │ D │
│ Crypto │ 21 │ 60m │
└─────────────────┴────────────┴─────────┘


█ **IMPORTANT NOTES**

⚠️ This is a momentum indicator, not a standalone system
⚠️ Works best as confirmation alongside price action analysis
⚠️ Zero crosses in ranging markets can produce false signals
⚠️ Pair with trend filter (ADX > 20) for best results


█ **RELATED**

Looking for the full system with signal scoring and multi-factor confluence?
Check out **HMA Concavity Pro** (invite-only) which adds:

• Overlay signals with 1-5 quality scoring
• ADX trend filtering
• Volume spike confirmation
• Key level detection
• Real-time trade readiness dashboard


█ **CREDITS**

Original HMA Concavity concept by Seth Urion (Mahsume)
Enhanced with MTF analysis, signal line, and visual improvements.


════════════════════════════════════════════════════════════


█ **DISCLAIMER**


This indicator is for educational purposes only. It does not guarantee profits or predict market direction. Past performance does not indicate future results. Always use proper risk management and test thoroughly before live trading.

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.