The Market Facilitation Index Indicator or MFI is a volatility indicator. Traders use it to measure the strength or weakness of movements in an asset’s price.
Because it measures market cycles, you can use the MFI indicator on all timeframes and in all market conditions. The MFI indicator looks at the change in size of price movements and the rising and falling of volume. It then uses a system of color-coded bars to indicate the strength of a trend in an asset’s price.
The indicator offers signals based on the relationship between changes in price volatility and trading volume.
The color-coded indicator similar to the one found in the MT4 Platform’s BW MFI Indicator is not available by default in TradingView.
This following script replicates the features of the BW MFI Indicator, originally developed by Bill Williams, hence the name “BW MFI.” It’s important to note that when you come across “MFI” in TradingView, it usually refers to the “Money Flow Index” indicator, which is different from the Bill Williams’ Market Facilitation Index.
@version=5
//Dexter
indicator(" Bill Williams Market Facilitation Index", shorttitle="BW MFI", overlay=false)
// Calculate the Market Facilitation Index
mfi = (high - low) / volume
// Custom colors
custom_brown = color.new(#721f1f, 0) // Define brown color
custom_pink = color.new(#fd4967, 0) // Define pink color
// Define color conditions based on Bill Williams' methodology
green_f = ta.change(mfi) > 0 and ta.change(volume) > 0
fade_f = ta.change(mfi) < 0 and ta.change(volume) < 0
fake_f = ta.change(mfi) > 0 and ta.change(volume) < 0
squat_f = ta.change(mfi) < 0 and ta.change(volume) > 0
// Assign colors
b_color = green_f ? color.green : fade_f ? custom_brown : fake_f ? color.blue : squat_f ? custom_pink : na
// Plot the MFI as a histogram
plot(mfi, color=b_color, style=plot.style_histogram, linewidth=4)
A blue bar is a fake bar and it appeared in the green candle that formed after lots of red candle.
It told “not to enter a long trade” in that place. It ended up as a minor retracement in a downtrend and a mere lower high. The price fell afterwards. This chart shows how BW MFI indicator helped us avoiding a trap.