Chaikin Money Flow (CMF) is the normalized cousin of the Accumulation/Distribution Line. While ADL is cumulative and unbounded, CMF oscillates between -1 and +1, measuring the persistence of buying or selling pressure over a rolling window.
The genius of CMF is that it answers not just "Are they buying?" but "Have they been buying *consistently*?" A CMF reading of +0.25 means 25% more money flow went into accumulation than distribution over the lookback period.
## Historical Context
Developed by Marc Chaikin as an evolution of his ADL work, CMF was designed to address ADL's major weakness: its unbounded nature made comparison across different securities impossible. By normalizing against volume, CMF became a true oscillator that traders could use with fixed thresholds.
Chaikin recommended watching for:
- CMF > 0: Bullish pressure dominates
- CMF < 0: Bearish pressure dominates
- CMF divergences: When price makes new highs but CMF fails to confirm
## Architecture & Physics
CMF builds on the Money Flow Multiplier concept but adds a rolling summation window. Instead of accumulating forever like ADL, it asks: "Over the last N periods, what's the net money flow relative to total volume?"
The key insight is **normalization by volume**. This means CMF can never exceed ±1, regardless of the absolute volume levels. A stock trading 10 million shares daily and one trading 10 thousand shares daily can both produce a CMF of 0.5—and that reading means the same thing for both.
### Component Breakdown
1.**Money Flow Multiplier (MFM)**: Same as ADL, ranges [-1, +1]
2.**Money Flow Volume (MFV)**: MFM × Volume
3.**Rolling Numerator**: Sum of MFV over period
4.**Rolling Denominator**: Sum of Volume over period
1.**Division by Zero**: If all volume in the period is zero (unlikely but possible with bad data), CMF is undefined. Implementation returns 0.
2.**Warmup Period**: CMF needs `period` bars before the rolling sums are meaningful. Before that, the calculation uses a growing window.
3.**Inside Bars**: When High = Low, the MFM is 0 regardless of close location. This is mathematically correct but can create unexpected readings.
4.**Volume Quality**: Like all volume-based indicators, CMF is only as good as the volume data. Crypto exchanges with wash trading, or futures with overnight gaps, can produce misleading readings.
5.**Threshold Fixation**: While ±0.25 is often cited as "strong" pressure, the appropriate threshold depends on the security's typical CMF volatility.
6.**isNew Parameter**: When correcting a bar (isNew=false), the implementation properly rolls back state. Failure to handle this causes cumulative errors.
## References
- Chaikin, M. (1996). "Chaikin Money Flow." *Technical Analysis of Stocks & Commodities*.