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
55 lines of Pine Script v4 from oscillators/mfi_money_flow_index.pine, published under GPL-3.0. Keep the author's credit and licence lines when you reuse it.
The script visually highlights trend conditions through dynamic ribbon filling, optional difference histogram bars, and overbought or oversold breakout fills. It also plots circle shapes upon MFI and signal line crossovers and provides optional background coloring based on whether the MFI is above or below the 50 middle level. Key settings include calculation lengths, source price, and customizable threshold levels.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Length
int
14
length
Signal Length
int
9
signalLength
Source
source
hlc3
src
Overbought Level
int
80
obLevel
Oversold Level
int
20
osLevel
Max Level
int
100
maxLevel
Min Level
int
0
minLevel
Show Histogram ?
bool
false
showHistogram
Highlight Overbought/Oversold Breakouts ?
bool
true
highlightBreakouts
Highlight MFI/Signal Crossovers ?
bool
true
highlightCrossovers
Highlight Middle Line Crossovers ?
bool
true
highlightMiddleCrossovers
Apply Ribbon Filling ?
bool
true
applyRibbonFilling
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.
This indicator measures directional momentum by evaluating candlestick body proportions and volume over a user-defined lookback window. It computes the ratio of candle body to total range, weights the cumulative value by volume and absolute body size, and dete
This indicator builds an aggregate oscillator in a separate pane. It scales open, high, low, close, and volume into a 0 to 1 range, then averages scaled readings from MACD, a MACD histogram, RSI, stochastic, CCI, momentum, OBV, a directional index, volume-weig
This indicator calculates the Bill Williams Market Facilitation Index as the high-low range divided by volume, or zero when volume is zero. It compares the index and volume with the previous bar and assigns one of four zones: green for both rising, fade for bo
PPO ATR Bands plots a percentage price oscillator in a separate pane. It compares a Hull average of typical price with a volume-weighted exponential average of Parabolic SAR, then scales three true-range bands around the slow average into matching oscillator l
Calculates the Chaikin Oscillator by taking the difference between a fast exponential moving average and a slow exponential moving average of the Accumulation/Distribution line. It plots the resulting line in a separate pane alongside a dashed zero reference l
This indicator calculates volume moving averages, volume spikes, and price-volume momentum to detect institutional order flow. It plots in a separate pane and generates visual signals for high-volume activity and flow persistence. Key inputs adjust the volume