Chaikin Money Flow (CMF) Indicator
The Chaikin Money Flow (CMF) indicator measures the volume-weighted average of accumulation and distribution over a set period, helping traders read the buying or selling pressure behind a market's moves.
What is the Chaikin Money Flow Indicator?​
Developed by Marc Chaikin, the CMF combines price and volume to show how much money is flowing into or out of a stock or index, typically over 20 or 21 periods.
- Positive CMF: the market is likely being accumulated; most volume is tied to upward price moves
- Negative CMF: the market is likely being distributed; most volume is tied to downward price moves
How to Read CMF​
- Above the zero line: buying pressure dominant
- Below the zero line: selling pressure dominant
- Divergence: if price makes a new high but CMF fails to reach a new high, momentum may be weakening, hinting at a possible reversal
Best Use Cases​
- Market Strength/Weakness: see whether money is flowing into or out of a stock.
- Trend Confirmation: a rising, positive CMF confirms an uptrend; a falling, negative CMF confirms a downtrend.
- Spotting Divergences: a mismatch between price highs/lows and CMF can flag a weakening trend.
Chaikin Money Flow PineScript for TradingView​
Here's a ready-to-use CMF strategy template. Paste it into the Pine Editor, adjust the length, overbought/oversold levels, target, and stop loss to your preference, and backtest it.
To learn how to add this pinescript in TradingView, click here.
This strategy is for demonstration purposes only and is not intended for actual trading. AlgoTest is not responsible for any profit or loss arising from the use of this sample strategy.
//@version=5
strategy("Chaikin Money Flow Strategy", overlay=true)
// Input parameters
length = input.int(20, title="Length")
overbought_level = input.float(0.3, title="Overbought Level")
oversold_level = input.float(-0.3, title="Oversold Level")
target_points = input.int(100, title="Target Points")
stop_loss_points = input.int(50, title="Stop Loss Points")
// Calculate Money Flow Multiplier (MFM) and Money Flow Volume (MFV)
typical_price = (high + low + close) / 3
money_flow = typical_price * volume
positive_money_flow = ta.sma(money_flow * (ta.change(typical_price) > 0 ? 1 : 0), length)
negative_money_flow = ta.sma(money_flow * (ta.change(typical_price) < 0 ? 1 : 0), length)
// Calculate Chaikin Money Flow (CMF)
cmf_value = (positive_money_flow - negative_money_flow) / ta.sma(volume, length)
// Strategy logic
long_condition = ta.crossover(cmf_value, oversold_level)
short_condition = ta.crossunder(cmf_value, overbought_level)
// Plot CMF
plot(cmf_value, color=color.blue, title="CMF")
// Strategy entry
if long_condition
strategy.entry("Long", strategy.long)
if short_condition
strategy.entry("Short", strategy.short)
// Calculate target and stop loss levels
long_target = high + target_points
long_stop_loss = low - stop_loss_points
short_target = low - target_points
short_stop_loss = high + stop_loss_points
// Strategy exit
strategy.exit("Long Exit", "Long", limit=long_target, stop=long_stop_loss)
strategy.exit("Short Exit", "Short", limit=short_target, stop=short_stop_loss)
Once you've backtested it, you can connect the alert to AlgoTest to automate live execution without manually watching the chart.
FAQ​
Is Chaikin money flow a good indicator?​
Yes, the Chaikin Money Flow is considered a good indicator for analyzing the market's buying and selling pressure, particularly when combined with other technical analysis tools.
How do you use Chaikin money flow?​
To use CMF effectively, look for periods where the indicator is above or below the zero line, which suggests accumulation or distribution, respectively. Also, look for divergences between the CMF and the price action as potential signals for reversals.
What is the best setting for the Chaikin money flow indicator?​
The typical setting for the CMF is 20 or 21 days, but this can be adjusted based on the trading style and the security's volatility.
How do you read Chaikin money flow?​
Read the CMF by observing its value relative to the zero line. Values above zero indicate buying pressure, while values below zero suggest selling pressure. Significant divergences from price trends can indicate potential price reversals.
What is the best money flow indicator?​
While the Chaikin Money Flow is highly regarded, the best money flow indicator can vary based on a trader's specific needs and strategy. Some traders might prefer the Money Flow Index (MFI), which also considers price and volume.
For more insights and detailed analysis tools, visit AlgoTest Signals.