Divergence compares selected price extremes with indicator readings. For a hypothetical pair of lows, price can fall from 100 to 99 while a momentum reading rises. That describes a disagreement under the chosen formula and point-selection rule; it does not certify weaker selling pressure or a future reversal. The worked example below shows the complete prices and when the comparison becomes available.

What divergence actually is

Divergence is a comparison between price and an oscillator such as RSI or MACD. Specify which two price points and indicator observations are paired. Indicator formulas transform their stated inputs; they do not directly measure the cost of a move or participants’ buying and selling intentions. Changing parameters or selecting different points can change the classification.

A divergence label does not by itself define an entry, exit, position size or available fill price. A strategy may use it as a condition, but its future outcome needs separate testing with costs. An additional candle pattern or level break is another condition, not a guarantee that reversal has begun. Do not choose only the historical disagreements followed by an attractive move.

Divergence also depends on the indicator period

Keep the pivot rule and the same reading candles. Change only the ROC period to see why an oscillator name without parameters is insufficient.

Scroll sideways to see the full diagram

Divergence also depends on the indicator periodLows on candles 6 and 13 are 100 and 99. ROC(2) compares them with 110 and 105, giving −9.09% and −5.71%: regular bullish geometry. ROC(5) compares the same prices with 120 and 130, giving −16.67% and −23.85%: both readings fall. Slopes are illustrative; each measure has a separate scale.Same lows, two ROC periodsPrice: lower second low10099ROC(2): higher reading−9.09%−5.71%ROC(5): lower reading−16.67%−23.85%Candle 6Candle 13

Hypothetical model: Candle closes 0–15:121, 120, 119, 118, 110, 105, 100, 104, 130, 120, 110, 105, 103, 99, 101, 102. Both lows are below two neighbours on either side; the second is recognized only after candle 15. Read the oscillator exactly at the pivots. ROC formula: Fidelity. The diagram does not forecast the next price.

At identical pivots, changing the ROC period can remove divergence.

Four types of divergence — regular and hidden

Four geometries, not four promised outcomes
Regular bullishPrice: lower low. Oscillator: higher low. A reversal hypothesis to test.
Regular bearishPrice: higher high. Oscillator: lower high. A reversal hypothesis to test.
Hidden bullishPrice: higher low. Oscillator: lower low. Commonly studied as a continuation hypothesis in an upward context.
Hidden bearishPrice: lower high. Oscillator: higher high. Commonly studied as a continuation hypothesis in a downward context.

The regular/hidden names classify relations between two selected points. Whether those points turn out to be the end of a trend is future information, not part of a signal that was available at the time. Define the preceding trend separately if a rule uses that context. Terminology also varies: RSI discussions may call the opposite geometry positive or negative reversals.

A complete ROC example and recognition time

Use these hypothetical closed-bar prices in abstract price units. ROC(2) = 100 × (C[t]/C[t−2] − 1). Our own low rule requires a close strictly below the two closes on either side; equal values fail. Compare successive price lows and read ROC at those exact bars, rather than find separate oscillator lows. This is one possible detector, not a platform-wide standard.

Hypothetical closes and ROC(2); no trade-performance sample
BarCloseROC(2)
0110Unavailable
1109Unavailable
2100−9.09%
3104−4.59%
41066.00%
51050.96%
6102−3.77%
799−5.71%
8101−0.98%
91034.04%
1098−2.97%

The first recognized low is bar 2, confirmed after bar 4. Bar 7 is lower, but only qualifies after bar 9 closes. Its ROC(2) is higher: −5.7143% versus −9.0909%, a difference of about 3.3766 percentage points. Both readings remain negative. Bar 10 then closes at 98: correct bullish geometry did not require the next price to rise.

After bar 9 closes, the comparison is known; that close is 103, not the earlier low of 99. Booking an entry at bar 7 using its later confirmation inserts unavailable information. A separately specified reversal candlestick pattern or level break could be an additional test condition, but does not identify who traded or ensure profit. Record the actual decision time and subsequent fill assumptions.

When the disagreement means continuation rather than reversal

For hidden bullish geometry, selected price lows rise while selected oscillator lows fall. In an upward context this is often studied as a continuation hypothesis; the bearish counterpart pairs lower price highs with higher oscillator highs. Neither relation proves that demand or supply is stronger, nor that this variant is more convenient or profitable. Keep the context and point-selection rules explicit.

A low recognized later cannot automatically serve as a contemporaneous entry. If a test adds a stop or target, specify when each becomes known, its order type, size, costs and how unavailable or unfilled orders are handled. There is no universal twelve-pip invalidation distance. Ordinary stop execution may differ from the planned level, so the planned distance is not a maximum possible loss.

How to build a trade around divergence

  1. Freeze inputs. Record instrument, feed, timeframe, price source, oscillator formula and period.
  2. Define extrema. State left/right neighbours, tie handling and the latest bar needed for recognition.
  3. Freeze pairing. Exact price-pivot bars and independent oscillator pivots are different methods.
  4. Classify geometry. Separate the regular/hidden label from a measured future outcome.
  5. Define context and extra conditions. A trend rule or candle condition must be known at the decision time.
  6. Define execution. State entry, exit, size, costs and fill assumptions, including failed or unfilled orders.
  7. Evaluate all qualifying cases. Separate development from unused data and retain unfavorable outcomes.

Parameters to record and test

Keep conditions reproducible
TimeframeRecord the chosen bars and costs; a larger interval does not establish predictive reliability.
ExtremaState the precise detector, including ties and recognition delay.
IndicatorRecord formula, parameters and selected component; an oscillator name alone is insufficient.
Additional conditionRecord when it becomes available and measure its contribution, including rejected cases.
ContextIf using support or resistance, define the level before the outcome and compare results without assuming it improves them.

Errors that can change the comparison

  1. Using later confirmation earlier. Record recognition time separately from the bar where a marker is drawn.
  2. Changing the point rule. Exact-bar values and nearby oscillator minima can give opposite labels.
  3. Changing parameters after the result. Retain every tested variant and evaluate a fixed version on unused data.
  4. Treating missing values as zero. A ROC reading needs its reference close and a nonzero denominator; missing input is not a neutral reading.
  5. Selecting only reversals. Keep all qualifying comparisons, including those followed by continuation, and define the evaluation horizon.

What to do tomorrow

  1. Recalculate the supplied series. Check all ROC(2) values, the two lows and their recognition bars. No trading account is needed.
  2. Change one rule. Try requiring three right-hand closes instead of two and record which data must be available. A pivot at bar 20 would require closure of bar 23, not an entry booked at bar 20.
  3. Design a separate evaluation. Freeze feed, timeframe, pairing, indicator settings and future horizon. Include every case, costs and fill assumptions if testing trades; keep later unused data for evaluation.

Related material: if you want to go deeper into the indicators themselves — the parameters, the traps in the readings and the differences between the two oscillators as divergence detectors — we cover that separately in the piece on divergence on RSI and MACD.