Chaikin money flow
All indicators

LibraryVolume

Indicator

Chaikin money flow

The share of the volume of the last n bars that came with closes near the high rather than near the low, from minus 1 to plus 1.

VolumeOwn pane1 inputCMF

How it is calculated

A bar's money flow volume is its close location, ((close minus low) minus (high minus close)) divided by (high minus low), times its volume, and 0 on a bar with no range. CMF is the sum of money flow volume over the length divided by the sum of volume over the same bars (Chaikin). The first value is at bar length minus 1; a window that traded no volume has no value.

Reference: Chaikin money flow (Chaikin)

How to read it

Above zero the closes have leaned toward the highs on the volume traded, below zero toward the lows. The further from zero, the clearer the pressure; values close to zero say little. As a ratio it compares across markets better than the A/D line, though on forex the volume is tick volume.

In a strategy

As a filter: only take longs while ctx.ind("cmf", length=20) is above zero, or close a long when it turns negative.

Inputs

InputTypeDefaultRange or choices
LengthlengthWhole number20min 1, max 5000

What it draws

LineDrawn as
CMFLine

Guide lines at 0.

Used in

No strategy template reads it yet.

OrionQuant