ROC Divergence Pass Node
Rate of Change Divergence — Series Input
Overview
The ROC Divergence Pass Node detects momentum divergence on a series input using Rate of Change. It compares the ROC of current price to prior ROC peaks and troughs — flagging divergence when price and momentum move in opposing directions.
Divergence detection is one of the most powerful early warning tools in technical analysis. When price makes a new high but ROC makes a lower high (bearish divergence), momentum is deteriorating even as price advances — often preceding a reversal. Conversely, bullish divergence signals potential bottoms.
Formula
Parameters
| Parameter | Default | Description |
|---|---|---|
| period | 14 | Lookback period for ROC calculation and divergence comparison |
Inputs & Outputs
| Slot | Direction | Type | Description |
|---|---|---|---|
| input | Input | { values, timestamps } | Price or any numeric series |
| values | Output | (number | null)[] | Divergence signal: +1 bullish, −1 bearish, 0 none; nulls during warm-up |
| timestamps | Output | number[] | Unix timestamps aligned to input |
Use Cases
Automated Divergence Detection
Automate the manual process of identifying divergence on charts — the node outputs a signal directly when divergence conditions are met, enabling systematic divergence-based strategies.
Trend Reversal Early Warning
Bearish divergence (−1) at price highs warns that upward momentum is weakening. Bullish divergence (+1) at price lows signals that downward momentum is fading — both precede many reversals.
Multi-Timeframe Confirmation
Run ROC Divergence on multiple timeframes simultaneously. When divergence appears on daily and weekly charts at the same time, the reversal probability is substantially higher than on a single timeframe.
Tips & Best Practices
Confirm with Price Action
Divergence signals alone are not sufficient for entries — confirm with a price action trigger (break of support/resistance, candlestick reversal pattern) before acting on the divergence signal.
Divergence in Strong Trends
In strong trends, bearish divergence can persist for many bars before a reversal occurs. Use a trend filter — only trade counter-trend divergence signals when the trend is mature or exhausted.
Combine Multiple Indicators
For highest-probability signals, require divergence on both ROC and RSI simultaneously. Dual-indicator divergence greatly reduces false signals compared to single-indicator divergence alone.