This indicator plots the Money Flow Index in a separate pane and marks regular and hidden bullish and bearish divergences between price pivots and the oscillator.
1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
185 lines of Pine Script v4 from divergences/mfi.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
MFI Divergences builds the index from positive and negative money flow, then finds pivot highs and lows using left and right lookbacks. A divergence is drawn only when the prior pivot falls inside the chosen bar range. Toggles show or hide each divergence type. Horizontal lines mark overbought and oversold levels. It does not place trades or manage exits.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Money Flow Period
int
14
len
Money Flow Source
source
close
src
Pivot Lookback Right
int
5
lbR
Pivot Lookback Left
int
5
lbL
Max of Lookback Range
int
60
rangeUpper
Min of Lookback Range
int
5
rangeLower
Plot Bullish
bool
true
plotBull
Plot Hidden Bullish
bool
false
plotHiddenBull
Plot Bearish
bool
true
plotBear
Plot Hidden Bearish
bool
false
plotHiddenBear
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
Oscillator Suite plots a normalised price oscillator in a separate pane and overlays a signal line that can use SMA, EMA, WMA, HMA, RMA, VWMA, T3, ZEMA, KAMA, or GKEMA. It marks bullish and bearish divergences, a smoothed money-flow series, confluence areas an
This indicator plots a smoothed Z-score of cumulative volume delta in a separate pane, showing whether buying or selling pressure is dominant and when the reading enters extreme zones. It marks spot accumulation, climax or exhaustion, and pivot-based price-vol
This indicator maps Stephen Klinger's volume force in a separate pane. It builds a Klinger volume oscillator from fast and slow exponential averages of a volume-force series, then subtracts a signal average to form a histogram. Display normalization keeps zero
QPulse is a multi-factor indicator that draws in a separate pane to evaluate market momentum, volume flow, and volatility dynamics. It calculates volume delta, a cumulative delta proxy, advanced adaptive ATR, and a hybrid volume-weighted RSI with overbought an
This indicator approximates cumulative volume delta from each bar's volume and candle body, then detrends and normalizes both price and CVD so they can be compared in a separate pane. It plots the two smoothed series and an optional histogram of their differen
This indicator combines the Relative Strength Index (RSI) and Money Flow Index (MFI) into a single hybrid oscillator in a separate pane. Users can adjust the relative weighting of price momentum and volume flow to create a custom hybrid value bounded between 0