In simple terms
A rising OBV means more volume was assigned to rising closes than to falling closes over the interval being compared. Positive CMF means the volume-weighted close location is above the midpoint of each bar’s own range on average. These statements describe different inputs, so one does not invalidate the other.
On this page
Ask two different questions of the same volume
On Balance Volume, OBV, compares the current close with the previous close. A higher close adds the whole current volume, a lower close subtracts it, and an exactly equal close adds nothing. Chaikin Money Flow, CMF, instead locates the close between the current high and low, then weights that location by volume. CMF does not use the previous close in its multiplier. A gap between bars can therefore produce a close-to-close fall and a positive current CMF contribution at the same time.
d_t = sign(C_t − C_prev); signed_volume_t = d_t × V_t
Separate the OBV starting value from its change
This guide starts OBV at 0 at the first canonical candle of each valid source segment. The first candle supplies a price reference and has no signed-volume contribution. Later contributions use only the sign of the close change, not its size, the open or the candle body colour. An arbitrary constant added to OBV changes its level, without changing its differences. A negative cumulative OBV is therefore not itself a bearish threshold. TA-Lib uses the first volume as its seed; identical later inputs give an additive offset within the same segment.
OBV_first = 0; OBV_t = OBV_prev + signed_volume_t
Build CMF from close location and a 20-bar window
For a positive range, the money flow multiplier MFM is ((C−L)−(H−C))/(H−L). It is +1 at the high, −1 at the low and 0 at the midpoint. Multiply MFM by current base volume to obtain money flow volume, MFV, then divide the sum of 20 MFV contributions by the sum of those same 20 volumes. The current bar is included. CMF20 first forms after 20 canonical adjacent candles. It is a volume-weighted average of close locations, not a count of trades near the high.
MFM_t = ((C_t − L_t) − (H_t − C_t)) / (H_t − L_t)
MFV_t = MFM_t × V_t
CMF20_t = SUM(MFV, 20) / SUM(V, 20)
An unchanged close can still contribute to CMF
The teaching table holds the range at 90–110 and volume at 100 ETH. A close of 105 produces MFM of 0.5 and MFV of 50 ETH. Its OBV contribution is +100, −100 or 0 ETH when the preceding close is 100, 110 or 105 respectively. Conversely, a close of 95 after 90 adds 100 ETH to OBV while contributing −50 ETH to the CMF numerator. These are constructed input comparisons, not trades. Candle body colour does not determine either classification.
Teaching example: identical volume, different classification
| Synthetic case | Previous canonical close · USDT per ETH | Close | Current signed OBV volume · ETH | Money flow multiplier · MFM | Current money flow volume · ETH |
|---|---|---|---|---|---|
| Higher close · upper half | 100.00 | 105.00 | 100.000000 | 0.5000 | 50.000000 |
| Lower close · upper half | 110.00 | 105.00 | −100.000000 | 0.5000 | 50.000000 |
| Equal close · upper half | 105.00 | 105.00 | 0.000000 | 0.5000 | 50.000000 |
| Higher close · lower half | 90.00 | 95.00 | 100.000000 | −0.5000 | −50.000000 |
Keep a zero-range bar’s volume in the denominator
When valid high and low are equal, we assign MFM and MFV of 0. That candle’s volume still belongs in the CMF denominator. In the 20-bar teaching window, 20 ranged bars with MFM of 0.5 and volume of 10 each give CMF of 0.5. Replacing one with a zero-range bar keeps total volume at 200 but lowers the numerator from 100 to 95, giving 0.475. All zero-range bars with positive volume give CMF of 0. If the entire window has zero volume, CMF is unavailable here. TA-Lib documents a 0 fallback for that last case.
H_t = L_t ⇒ MFM_t = 0; MFV_t = 0
Teaching example: zero range differs from zero window volume
| Synthetic case | Positive-range bars | Zero-range bars | Volume per bar · ETH | 20-bar MFV sum · ETH | 20-bar volume sum · ETH | Chaikin Money Flow · CMF20 |
|---|---|---|---|---|---|---|
| All bars have a positive range | 20 | 0 | 10.000000 | 100.000000 | 200.000000 | 0.5000 |
| One zero-range bar | 19 | 1 | 10.000000 | 95.000000 | 200.000000 | 0.4750 |
| All bars have zero range | 0 | 20 | 10.000000 | 0.000000 | 200.000000 | 0.0000 |
| Entire window has zero volume | 20 | 0 | 0.000000 | 0.000000 | 0.000000 | Unavailable |
Compare changes over the same 20 contributions
A one-bar OBV increase and a negative 20-bar CMF mix two horizons. Our main examples instead compare CMF20 with OBV_t−OBV_(t−20): the sum of signed volumes on exactly the same 20 bars. This difference needs 21 adjacent canonical prices because its first contribution uses the preceding close. Dividing that difference by the same window volume gives a normalized OBV change between −1 and +1. This is a teaching diagnostic, not the raw cumulative OBV. CMF and the diagnostic share a denominator but use different numerator weights.
change20_t = OBV_t − OBV_(t−20) = SUM(signed_volume, 20)
balance20_t = change20_t / SUM(V, 20)
Use actual base volume and explicit source boundaries
The pinned Binance ETH/USDT spot source has 14,434 H4 rows from 79 monthly archives, 2 missing scheduled candles and 11 noncanonical source close labels. Volume is total traded ETH on this spot market, rather than USDT turnover, taker-buy volume or market-wide volume. It is positive throughout this dataset. We reject missing, negative or nonfinite volume; genuine zero volume remains valid. A missing anchor or noncanonical close label ends the segment. The next canonical row restarts OBV at 0; CMF needs 20 rows and the matched OBV change 21. Raw rows remain in the downloads. Original archives are not downloaded again.
OBV can rise while matched-window CMF is negative
The first eligible case is available at 2023-01-18 16:00 UTC. Over the same 20 contributions, OBV changes by 130,711.509200 ETH and its normalized change is 0.0743, while CMF20 is −0.0245. The volume assigned to higher closes exceeds that assigned to lower closes, yet the volume-weighted close location is below each bar’s own midpoint on average. The selected candle itself has signed volume of −231,844.551300 ETH: the current contribution alone does not determine the whole window. S marks the completed reference candle.
Positive 20-bar OBV change, negative CMF20
CMF20 · close-location weightsNormalized OBV change · 20 signed volumes
Calendar gap Candles are evenly spaced in observed order. Dashed markers show compressed calendar gaps; missing bars are not added. Lines break at unavailable values. Outlined candle bodies mark noncanonical source close labels. Cumulative OBV keeps its segment origin; the sign of its cumulative value alone is not a trading threshold.
Select a candle, move the slider or use arrow keys. Prices display 2 decimals, volume-based values 6 and ratios 4. S stays on the reference candle; the cursor and details follow your selection. Axes remain fixed. Unformed or undefined values are shown as unavailable.
- Interval anchor · UTC
- 2023-01-18 12:00 UTC
- Scheduled interval end · UTC
- 2023-01-18 16:00 UTC
- Original source close label · UTC
- 2023-01-18 15:59:59.999 UTC
- Open
- 1,575.90
- High
- 1,610.00
- Low
- 1,533.02
- Close
- 1,549.75
- Previous canonical close · USDT per ETH
- 1,575.90
- Total base volume · ETH
- 231,844.551300
- Close direction versus previous close
- Lower close · subtract volume
- Current signed OBV volume · ETH
- −231,844.551300
- Cumulative OBV · ETH
- −8,529,298.753730
- Money flow multiplier · MFM
- −0.5653
- Current money flow volume · ETH
- −131,071.380522
- 20-bar volume sum · ETH
- 1,758,287.851800
- 20-bar MFV sum · ETH
- −43,054.540384
- Chaikin Money Flow · CMF20
- −0.0245
- 20-bar OBV change · ETH
- 130,711.509200
- Normalized 20-bar OBV change
- 0.0743
- Canonical bars in CMF window
- 20
- Canonical source close label
- Yes
- Adjacent canonical price rows
- 2,858
OBV can fall while matched-window CMF is positive
At 2023-01-06 00:00 UTC, the matched 20-bar OBV change is −31,058.086800 ETH, its normalized value is −0.0314 and CMF20 is 0.1484. These readings can coexist because a candle may close below the previous close while closing in the upper half of its own range. The result uses all 20 weighted contributions, including which observation has left the rolling window. It does not say that one indicator is correct and the other broken, nor establish an entry or a profitable reversal rule.
Negative 20-bar OBV change, positive CMF20
CMF20 · close-location weightsNormalized OBV change · 20 signed volumes
Calendar gap Candles are evenly spaced in observed order. Dashed markers show compressed calendar gaps; missing bars are not added. Lines break at unavailable values. Outlined candle bodies mark noncanonical source close labels. Cumulative OBV keeps its segment origin; the sign of its cumulative value alone is not a trading threshold.
Select a candle, move the slider or use arrow keys. Prices display 2 decimals, volume-based values 6 and ratios 4. S stays on the reference candle; the cursor and details follow your selection. Axes remain fixed. Unformed or undefined values are shown as unavailable.
- Interval anchor · UTC
- 2023-01-05 20:00 UTC
- Scheduled interval end · UTC
- 2023-01-06 00:00 UTC
- Original source close label · UTC
- 2023-01-05 23:59:59.999 UTC
- Open
- 1,253.62
- High
- 1,254.31
- Low
- 1,248.19
- Close
- 1,251.24
- Previous canonical close · USDT per ETH
- 1,253.62
- Total base volume · ETH
- 35,661.731500
- Close direction versus previous close
- Lower close · subtract volume
- Current signed OBV volume · ETH
- −35,661.731500
- Cumulative OBV · ETH
- −9,354,437.046930
- Money flow multiplier · MFM
- −0.0033
- Current money flow volume · ETH
- −116.541606
- 20-bar volume sum · ETH
- 987,542.524600
- 20-bar MFV sum · ETH
- 146,511.596226
- Chaikin Money Flow · CMF20
- 0.1484
- 20-bar OBV change · ETH
- −31,058.086800
- Normalized 20-bar OBV change
- −0.0314
- Canonical bars in CMF window
- 20
- Canonical source close label
- Yes
- Adjacent canonical price rows
- 2,782
A higher close can have a negative current MFV
At 2023-01-02 12:00 UTC, the close rises from 1,213.09 to 1,217.35 USDT per ETH. OBV therefore adds 66,284.426300 ETH. But the close lies in the lower half of the current range: MFM is −0.2017, producing MFV of −13,371.663487 ETH. This single-bar example isolates the classification difference. It is not selected for opposite 20-bar signs; CMF20 is 0.0876 and the normalized OBV change is 0.4062. A negative current contribution need not make the whole rolling CMF negative.
One rising close can add positive OBV volume and negative MFV
CMF20 · close-location weightsNormalized OBV change · 20 signed volumes
Calendar gap Candles are evenly spaced in observed order. Dashed markers show compressed calendar gaps; missing bars are not added. Lines break at unavailable values. Outlined candle bodies mark noncanonical source close labels. Cumulative OBV keeps its segment origin; the sign of its cumulative value alone is not a trading threshold.
Select a candle, move the slider or use arrow keys. Prices display 2 decimals, volume-based values 6 and ratios 4. S stays on the reference candle; the cursor and details follow your selection. Axes remain fixed. Unformed or undefined values are shown as unavailable.
- Interval anchor · UTC
- 2023-01-02 08:00 UTC
- Scheduled interval end · UTC
- 2023-01-02 12:00 UTC
- Original source close label · UTC
- 2023-01-02 11:59:59.999 UTC
- Open
- 1,213.08
- High
- 1,224.29
- Low
- 1,212.74
- Close
- 1,217.35
- Previous canonical close · USDT per ETH
- 1,213.09
- Total base volume · ETH
- 66,284.426300
- Close direction versus previous close
- Higher close · add volume
- Current signed OBV volume · ETH
- 66,284.426300
- Cumulative OBV · ETH
- −9,360,307.868430
- Money flow multiplier · MFM
- −0.2017
- Current money flow volume · ETH
- −13,371.663487
- 20-bar volume sum · ETH
- 658,518.476400
- 20-bar MFV sum · ETH
- 57,687.770358
- Chaikin Money Flow · CMF20
- 0.0876
- 20-bar OBV change · ETH
- 267,457.541400
- Normalized 20-bar OBV change
- 0.4062
- Canonical bars in CMF window
- 20
- Canonical source close label
- Yes
- Adjacent canonical price rows
- 2,761
Read the axes, units and precision before comparing lines
Candles use USDT per ETH. The cumulative OBV pane uses ETH and retains the source-segment origin rather than restarting at the visible chart edge. CMF20 and normalized OBV change share a fixed −1 to +1 pane, with separate colours. OHLC displays 2 decimals, volume-based values 6 and ratios 4; exact integers and rational numbers decide all comparisons before rounding. Lines break at unavailable values. Observed candles are evenly spaced, compressed calendar gaps are marked, and outlined bodies identify noncanonical source close labels. Cursor movement does not rescale the plots or move S.
Replay the calculation before adding trading rules
The protocol was fixed before scanning these previously published inputs. Starting from 2023-01-01 UTC, we take the first distinct eligible case for each declared condition. S and its 25 predecessors must form 26 adjacent canonical price rows; both 20-bar diagnostics at S are formed, although the earliest visible indicator values can still be warming up after a segment start. Five later observed candles provide display context only; their prices, volume, quality and returns do not rank selection. Downloads provide inputs, CSV, protocol and separate replay and independent-check scripts. No orders, execution, costs or account returns are calculated.
python3 obv-cmf-guide-replay.py --protocol obv-cmf-guide-protocol.json --source-evidence eth-wr-evidence.json --output replay.json python3 obv-cmf-guide-independent-check.py --protocol obv-cmf-guide-protocol.json --source-evidence eth-wr-evidence.json --evidence replay.json --report check.json
Frequently asked questions
Does positive CMF measure money entering the asset?
No. CMF is a volume-weighted average of candle close locations. It does not identify the aggressor of every trade, count buyers or measure net capital inflows. Every matched trade has both a buyer and a seller.
Which indicator should win when OBV and CMF disagree?
Neither automatically wins. First align the instrument, volume field, completed bars and comparison horizon. Then inspect close-to-close directions versus within-bar close locations. The different weighting rules can explain opposite readings without a calculation error.
What happens if the close is unchanged or the candle has no range?
An exact close-to-close tie contributes 0 to OBV, even with positive volume. It can still have nonzero MFV if the close is away from the current range midpoint. A valid zero-range candle contributes 0 MFV here, while its volume remains in the CMF denominator.
Is CMF the same as the Chaikin Oscillator or MFI?
No. CMF divides a rolling sum of MFV by rolling volume. The Chaikin Oscillator compares moving averages of the cumulative Accumulation/Distribution line. Money Flow Index classifies typical-price times volume by changes in typical price and uses a different ratio. Similar names do not imply interchangeable values.
Can I replace ETH volume with quote turnover or Forex tick volume?
That changes the weights and can change both indicators. ETH volume and USDT turnover are different fields; Forex tick volume measures feed activity rather than a consolidated traded quantity. Multiplying every volume by the same positive constant scales raw OBV and MFV but preserves CMF and normalized OBV change. Switching volume definitions is generally not such a constant conversion.
Why can another platform show a different OBV level or empty-window value?
Check the initial seed, history start, source continuity and zero-volume policy. Our OBV starts at 0 in each canonical segment; TA-Lib starts with the first volume. Our zero-volume CMF is unavailable, while TA-Lib documents 0. Different history or data boundaries can also change outputs; we do not claim bitwise platform parity.
Primary sources
Copying or republication without attribution and an active link to the original material is prohibited. Usage policy.