OPEN-SOURCE SCRIPT
Composite Money Flow (MFI + CMF + OBV z-score)

Composite Money Flow gives a single, easy-to-read readout of buy/sell pressure by combining three complementary flows:
MFI (Money Flow Index) — price × volume momentum, native 0..100
CMF (Chaikin Money Flow) — accumulation/distribution across the bar (≈ −1..+1)
OBV z-score — manual OBV (cumulative signed volume) standardized, then squashed to −100..+100
All three are normalized to the same scale (−100..+100) and combined with user-set weights to form a composite Money Flow Score plus a Signal (SMA). Use thresholds to flag strong accumulation/distribution and alerts for timely notifications.
What you get
Money Flow Score (−100..+100) with color change at zero
Signal line (SMA) to smooth whipsaw
Upper/Lower thresholds (defaults +50 / −50) with optional background shading
Component lines (optional) to see each contributor (MFI/CMF/OBV) on the same scale
Six alerts: cross up/down 0, enter/exit extreme zones, cross above/below signal
Inputs (key)
Lengths: MFI Length, CMF Length, OBV Z-Score Length, Signal Smoothing
Weights: Weight: MFI, Weight: CMF, Weight: OBV Z-Score (blend to taste)
Zones: Upper Threshold (+), Lower Threshold (−)
Display: Show Component Lines, Shade Background in Extreme Zones
How traders use it
Direction filter: Score > 0 favors longs; < 0 favors shorts.
Momentum turns: Score crosses Signal → early shift in flow.
Strength zones: Above Upper = strong buy pressure; below Lower = strong sell pressure.
Confluence: Pair with structure (S/R, trend) and execution rules (ATR stop, risk budget).
Notes (implementation)
OBV is computed manually for compatibility; then standardized (z-score) and squashed to −100..+100 (softsign).
All plots are non-repainting; signals update live until bar close like any indicator.
Alerts Provided
Money Flow crosses up 0
Money Flow crosses down 0
Money Flow enters positive zone (above Upper)
Money Flow enters negative zone (below Lower)
Money Flow crosses above Signal
Money Flow crosses below Signal
Good starting settings
MFI 14, CMF 20, OBV Z-Score 50, Signal 9
Weights: MFI 1.0, CMF 1.0, OBV 1.0
Thresholds: +50 / −50
Turn on background shading for quick visual reads
Disclaimer
This script is for educational purposes only and is not financial advice or a recommendation. Trading involves risk; past results do not guarantee future performance. Signals can fail, especially around news and regime shifts. Test on paper, verify settings, and use appropriate position sizing and risk controls. You are solely responsible for your trading decisions.
MFI (Money Flow Index) — price × volume momentum, native 0..100
CMF (Chaikin Money Flow) — accumulation/distribution across the bar (≈ −1..+1)
OBV z-score — manual OBV (cumulative signed volume) standardized, then squashed to −100..+100
All three are normalized to the same scale (−100..+100) and combined with user-set weights to form a composite Money Flow Score plus a Signal (SMA). Use thresholds to flag strong accumulation/distribution and alerts for timely notifications.
What you get
Money Flow Score (−100..+100) with color change at zero
Signal line (SMA) to smooth whipsaw
Upper/Lower thresholds (defaults +50 / −50) with optional background shading
Component lines (optional) to see each contributor (MFI/CMF/OBV) on the same scale
Six alerts: cross up/down 0, enter/exit extreme zones, cross above/below signal
Inputs (key)
Lengths: MFI Length, CMF Length, OBV Z-Score Length, Signal Smoothing
Weights: Weight: MFI, Weight: CMF, Weight: OBV Z-Score (blend to taste)
Zones: Upper Threshold (+), Lower Threshold (−)
Display: Show Component Lines, Shade Background in Extreme Zones
How traders use it
Direction filter: Score > 0 favors longs; < 0 favors shorts.
Momentum turns: Score crosses Signal → early shift in flow.
Strength zones: Above Upper = strong buy pressure; below Lower = strong sell pressure.
Confluence: Pair with structure (S/R, trend) and execution rules (ATR stop, risk budget).
Notes (implementation)
OBV is computed manually for compatibility; then standardized (z-score) and squashed to −100..+100 (softsign).
All plots are non-repainting; signals update live until bar close like any indicator.
Alerts Provided
Money Flow crosses up 0
Money Flow crosses down 0
Money Flow enters positive zone (above Upper)
Money Flow enters negative zone (below Lower)
Money Flow crosses above Signal
Money Flow crosses below Signal
Good starting settings
MFI 14, CMF 20, OBV Z-Score 50, Signal 9
Weights: MFI 1.0, CMF 1.0, OBV 1.0
Thresholds: +50 / −50
Turn on background shading for quick visual reads
Disclaimer
This script is for educational purposes only and is not financial advice or a recommendation. Trading involves risk; past results do not guarantee future performance. Signals can fail, especially around news and regime shifts. Test on paper, verify settings, and use appropriate position sizing and risk controls. You are solely responsible for your trading decisions.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.