ROC Divergence Node
Rate of Change with Divergence Detection
Overview
ROC Divergence combines Rate of Change momentum detection with automatic divergence pattern recognition. Instead of plotting raw ROC, this indicator highlights when price and ROC create divergence patterns - the strongest reversal signals. Classic divergence (price new high, ROC doesn't) becomes visually obvious and automatically detected, triggering alerts before traders manually spot the pattern.
Divergences are among the most reliable reversal signals in trading, yet they take time to identify manually. ROC Divergence automates the detection, removing emotion and human eye-strain. Bullish divergences (price down, ROC up) show potential bottoms. Bearish divergences (price up, ROC down) show potential tops. Perfect for traders who recognize the power of divergences but want algorithmic confirmation.
Formula
ROC Divergence detects momentum/price divergence patterns:
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| roc_period | number | 12 | ROC calculation period. |
| lookback | number | 20 | Period for finding extremes. |
| source | Node | Auto | The root data source node. |
💡 Tip: ROC period 10-14 standard. Lookback 15-25 for finding extremes. Shorter lookback = faster divergence detection but more false positives. Longer lookback = slower but more confirmed patterns.
Common Use Cases
1. Automatic Divergence Alerts
Let indicator find divergences instead of watching charts constantly. Price making new high gets automatic flagged if ROC doesn't confirm. Never miss a setup because you weren't looking at the right moment. Alerts are emails/pop-ups.
2. Reversal Timing Entry
Bearish divergence detected = short entry setup on next pullback. Bullish divergence detected = long entry on next test of recent low. Automation removes emotion. Entry signals become mechanical, reducing hesitation.
3. Trend Exhaustion Confirmation
Multiple divergences (2+ in sequence) = trend nearly exhausted, reversal very likely. Algorithm counts divergences, shows confidence level. Single divergence = attempt, multiple = confirmation worth trading with larger size.
4. Breakout False Signal Detection
Breakout above resistance gets immediately checked: if bearish divergence exists, fake breakout. Exit before crowd realizes it's false. Algorithmic breakout quality scoring prevents losses on weak false breaks.
Advantages & Limitations
Advantages
- Automates divergence identification
- Never miss a divergence setup
- Removes emotion from pattern recognition
- Combines trend + divergence logic
- Quantifies divergence strength (count)
Limitations
- False divergences in choppy markets
- Divergence can persist 5-10 bars before reversal
- Requires price confirmation to trade
- Algorithm parameter tuning needed
- Works best w/ support/resistance levels
Tips & Best Practices
💡 Confirm with Price Action
Divergence alone doesn't enter. Use with support/resistance: bearish divergence + price near resistance = high probability short. Bullish divergence + price near support = high probability long. Divergences are bias, not signals.
📊 Watch for Hidden Divergences
Classic divergence (price new high, ROC lower) indicates reversal. Hidden divergence (price higher high, ROC higher high) indicates continuation. Algorithm should distinguish both types.
⚡ Single Divergence Confidence
2+ divergences in same area = nearly guaranteed reversal. Single divergence = trade at 1x size. Double divergence = 2x size. Strong algorithmic signal gets bigger position.
⚠️ Allow for Lag
Divergence can form but price continues for 3-5 bars before reversing. Don't expect immediate reversal. Place stops tightly but be patient with target. Some of best trades take 5 bars to trigger.
Example Strategy
ROC Divergence automated reversal strategy:
ROC Divergence Alert Trade
1Alert Phase
- ROC Divergence indicator detects bearish divergence
- Price new high but ROC making lower high
- Automatic email/SMS alert triggered
2Entry Signal
- Trader receives alert, checks resistance level
- If price already at/near resistance, prepare short
- Enter short on pullback to resistance
3Exit Condition
- Price closes above recent high (divergence failed)
- ROC returns positive confirming recovery
- Or take profits at 2-4% move down
4Risk Rules
- Stop above the recent price high (divergence contradiction)
- Only trade divergence confirmed by support/resistance confluence
- Risk 1-2% per trade, 2% for double divergences