Indicator · Pine Script v6 · Own pane

Market Facilitation Index (MARKETFI)

by mihakralj

This script calculates Bill Williams' Market Facilitation Index (BW MFI) to evaluate price movement efficiency relative to trading volume.

View on GitHub

GitHub stars99on the repository
Pine versionv6current
Lines of code15
Settings0inputs
LicenceApache-2.0
Last update4 weeks ago27 Sep 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

15 lines of Pine Script v6 from lib/oscillators/marketfi/marketfi.pine, published under Apache-2.0. Keep the author's credit and licence lines when you reuse it.

marketfi.pine
// Licensed under the Apache License, Version 2.0
// © mihakralj
//@version=6
indicator("Market Facilitation Index (MARKETFI)", "MARKETFI", overlay=false)

// Bill Williams' Market Facilitation Index (BW MFI)
// Measures price movement efficiency per unit of volume.
// High MFI + rising volume = strong trend (green)
// Low MFI + falling volume = squat / accumulation (brown)
// Guard: volume == 0 produces 0.0 (no market activity = no MFI)

mfi = volume != 0 ? (high - low) / volume : 0.0

plot(mfi, title="MARKETFI", color=color.blue, linewidth=2)
hline(0, "Zero", color=color.gray, linestyle=hline.style_dashed)

Overview

Market Facilitation Index (MARKETFI) computes the range between the high and low prices divided by volume for each bar, returning zero when volume is zero. The resulting index is plotted as a line in a separate pane alongside a dashed zero reference line. Higher values represent greater price movement per unit of volume. There are no configurable inputs or built-in trade signals included in this implementation.

Details

Published by

mihakralj on GitHub

Type

Indicator, Pine Script v6

Draws

Separate pane below the chart

Category

Volume, Volatility & bands

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Topics

algorithmic-tradingcsharpdotnetpinescriptpythonquantitative-financesimdta-libtechnical-analysistechnical-indicators

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.

Similar Pine Scripts

This indicator plots a Supertrend-based trend-following setup in a separate pane and skips conditions it treats as a sideways market. A volatility range is built from an ATR value, with RMA, SMA, EMA, or WMA smoothing, or from a fixed point distance. Optional

Indicator v5 TrendVolatility & bands
Updated 1 year ago · MPL-2.0 GitHub repository of Trend Following Setup - Sideways Market Skipper
114 stars

This indicator standardizes price inputs using z-score normalization before calculating a relative strength index (RSI). It generates trade signals when standardized price components cross over or under the standardized RSI feature. Signals can be filtered by

Indicator v4 Oscillators & momentumVolatility & bands Repaints
Updated 1 year ago · None stated GitHub repository of Preprosessed & Standardized RSI

PPO ATR Bands

by cryptorife
75 stars

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

Indicator v4 Oscillators & momentumMoving averages
Updated 3 years ago · GPL-3.0 GitHub repository of PPO ATR Bands

This indicator combines Chaikin Money Flow (CMF), a SuperTrend baseline, and an Average True Range (ATR) calculation inside a separate sub-pane. It calculates a standard 20-period CMF plotted as a line and colored histogram columns around a zero baseline, trac

Indicator v6 TrendVolume
Updated 6 months ago · Apache-2.0 GitHub repository of Institutional View: CMF & SuperTrend

This indicator calculates the Relative Strength Index (RSI) alongside a simple moving average to generate directional momentum signals in a separate pane. It supports Break Flip and Break Continuous scanning modes for long and short setups. A wide array of opt

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of Momentum Setup: RSI Direction Confirmation

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers