Closed candles only
A divergence is measured the moment its end-point (second pivot) candle has closed: a candle is closed when a later
candle exists, or its time is up AND the data feed has printed past its end. A frozen feed never closes a candle.
The forming candle is drawn on the chart but never measured. Before a market break (daily or weekend), the last
candle closes 25 minutes after its end once the feed delivered the session's final minute.
Lookbacks 8 · 13 · 21 · 55 · 89 · 144
A pivot must be the highest (or lowest) point of the previous 8, 13, 21, 55, 89 or 144 candles; the end pivot counts
when its own candle closes, an earlier pivot once a closed candle follows it. The two pivots are 5 to 60 candles apart
(the common indicator default range). All six pivot ranges are scanned for each RSI period and for raw OBV. The three colored OBV moving averages are display guides only. Hiding a curve or range line does not change detection. The same pivot pair found by several
lookbacks is ONE divergence, and the Lookback column lists which found it. Hidden OBV divergences (price holds
above/below its prior extreme while OBV makes a new one) use the obv scanner's own rule: pivot widths 2–13, strength
≥ 0.45 against the OBV range of that scanner's window.
Types and strength
RSI = momentum divergence; OBV = volume-flow divergence; RSI+OBV = both, same direction, over the same swings;
conf! = the other indicator diverges the opposite way. STRONG = an RSI pivot under 32 or over 68; SUPERSTRONG = under
27 or over 73. A divergence stays listed for 5 candles after it became knowable.
Telegram
Title "Div Alert", then one line per NEW divergence, e.g. STRONG ES Bull 30m RSI 31/52 OBV w:13cdl -14min 2x (w = the divergence's width in candles, -14min = minutes since its end candle closed, 2x = the same divergence direction also on the candle before), then the
link. Sent right after each 30- and 45-minute candle close (every other size closes on those moments too):
ES, NQ, GC and CL within seconds, the rest about a minute later.
Data
Three lanes, all from the house store: a week of 15-minute bars (30m, 45m), a quarter of hourly bars (1h, 4h, 8h,
and the daily candles — one per trading session, cut at the session close: CME 17:00 New York, equities 16:00,
FX 17:00, the dollar index 17:00) and five years of daily bars (weekly candles, ending at the week's last close). ES, NQ, GC and CL come from the live feed. The 35 stocks-store equities
(e.g. AMD) have hourly and daily bars only, so they have no 30m or 45m candles.