Market Facilitation Index
Market Facilitation Index, Bill Williams' — the bar's range divided by its volume, coloured by whether that index and the volume rose or fell together.
It measures how much price movement each unit of activity bought. The four colours are the reading and they are the whole indicator: both up, both down, index up with volume down, and index down with volume up. On these feeds volume is tick count, so it is activity and not traded size.
01The study, live
Computed by Bentrix’s own code over the same synthetic bars on every page — an illustration of how the study behaves, not a market.
What this figure shows
The figure is computed over 300 sample bars, and Market Facilitation Index has a value from the first. Its bars run between 0.0152 and 0.2335 on these bars, and the last value is 0.0995. Counting the conditions the study declares on these bars: turns up 105 times; turns down 104 times. Press a condition under the figure to see each place marked. As states rather than moments: is rising on 142 bars; is falling on 157 bars.
02Its parts, named
03What you see
Bars in their own pane, one per price bar: the bar's range divided by its volume. Each is coloured by whether this value and the volume rose or fell from the bar before — four colours in all.
04Where it comes from
Bill Williams introduced the Market Facilitation Index in Trading Chaos (1995) to ask how much price movement each unit of volume bought. He named the four combinations of a rising or falling index with rising or falling volume.
05The formula
MFIₜ = ((Hₜ − Lₜ) / point)/Vₜ
The range is counted in points — the instrument's smallest price step — so the value is points of range per unit of volume.
| Index | Volume | Williams' name |
|---|---|---|
| up | up | green |
| down | down | fade |
| up | down | fake |
| down | up | squat |
06A worked example
The sample bars used here are eight: closes 20, 21, 23, 22, 24, 25, 24, 26; highs 21, 22, 24, 24, 25, 26, 26, 27; lows 18, 19, 20, 21, 21, 23, 23, 23; opens 19, 20, 21, 23, 22, 24, 25, 24; volumes 100, 120, 150, 90, 140, 160, 80, 170.
The last bar has a range of 27 − 23 = 4 and a volume of 170. The range is counted in the instrument's own point; with a point of 0.00001, as on the sample market, it is 400,000.
MFI = 400,000 / 170 = 2,352.94
The bar before had a range of 3 on a volume of 80: 300,000 / 80 = 3,750.00.
So from one bar to the next the index fell (3,750.00 → 2,352.94) while volume rose (80 → 170). That pair — index down, volume up — is the state Williams called a squat: much activity, little progress per unit of it.
07Built in Assay
The same study written in Assay, Bentrix’s script language, and drawn by Bentrix itself as the script’s graph: each block is one step of the formula. On the ladder the steps stand in the script’s order, one a row; on the board each wire carries a value from the block that gives it to the block that reads it, left to right. The script computes exactly what the study computes — Bentrix checks the two against each other, candle by candle.
//@version=6 indicator("Bill Williams' Market Facilitation Index") // The bar's range for each unit of volume, counted in points. mfi = (high - low) / volume / syminfo.mintick plot(mfi, "BW MFI", style = plot.style_histogram)
Paste it into the Assay IDE to put it on a chart, or to change it. Looking at the graph is free in every package; editing it as blocks is Plus.
08Readings — what traders look for
Green. Read as more movement on more volume — participation growing with the move.
Squat. Read as heavy volume with little movement; Williams paid it particular attention as a bar where the two sides were evenly matched.
Fade and fake. Read as interest waning, and as movement without volume behind it.
How the four colours fail. Each colour is decided by two one-bar comparisons, so it changes almost every bar. Williams read the squat in particular as a struggle before a move; squats are common, and most are followed by an ordinary bar.
How it fails on tick volume. On markets without a central tape (spot forex, most CFDs) the volume is one broker's count of price changes, not traded size. The study then measures activity on that feed; two brokers give two lines.
09In different markets and timeframes
The Market Facilitation Index is range per unit of volume, and its reading is the four combinations of its direction with volume's. Each is one bar's comparison and changes almost every bar. On markets without a central tape its volume is a count of ticks on one feed, and it should be read as activity rather than size.
10With other studies
Read with volume directly beneath it — the colours are the two together.
11What it does not tell you
Each colour compares one bar with the one before; it describes that bar. On feeds whose volume is a tick count, the index measures range per tick, not per unit traded. See volumeVolumeHow much trading happened in a period. In currency markets, usually the number of ticks (tick volume) rather than the amount traded..
12Inputs and defaults
- 1Timeframe — ChartThe chart's own by default; any higher one, read on the last closed candle. A finer one is never offered.
- 2Wait for the candle to close — OnThe value of a higher timeframe is taken only from a candle that has finished.
What each input changes
- TimeframeThe study has no numeric input: each bar is its own range per unit of volume, coloured by comparison with the bar before.
- In useIt has no input.
13Limits and common misreadings
Unit-dependent. Its values are not comparable between markets or between feeds of one market.
One bar's comparison. A colour is not a phase; a squat bar is common in every kind of market.
14Conditions an alert or a strategy can watch
an event happens on one bar a state holds on every bar while it lasts
These are the conditions the study itself declares — the same rules the alert editor and the strategy engine read, and the ones the figure's chips show.
15Practise it in the laboratory
Attach the Market Facilitation Index on an M15 replay. Mark every squat bar in a day and look at the ten bars after each.
Open the laboratory17In Bentrix
- From the menu: a chart's Indicators button › Bill Williams › Market Facilitation Index, or type Market Facilitation Index in its search.
- Its settings: the settings card opens when it is added; its legend's name opens it again.
18From an agent or a program
Two tools reach it. study_values computes it over a workbench’s candles up to the clock — no chart needed — and study_attach puts it on a chart, where it is drawn and saved with the chart ({"chart": "<chart uri>", "kind": "bw_mfi"}).
The study, as a chart files it
This is a new Market Facilitation Index’s entry — its kind, its calculation, the price it reads and its settings. Change a setting here to read it with other inputs.
{
"applied": "close",
"convention": "talib",
"kind": "bw_mfi",
"settings": {
"shape": "none"
}
}An agent
An agent calls the MCP tool with it:
{
"name": "study_values",
"arguments": {
"bench": "bentrix://lab/\u2026/bench/\u2026",
"symbol": "EURUSD",
"timeframe": "H1",
"limit": 5,
"study": {
"applied": "close",
"convention": "talib",
"kind": "bw_mfi",
"settings": {
"shape": "none"
}
}
}
}A program
A program does the same in its language — bench and market as in the built-in indicators guide:
Python
values = client.study.values(bench, market, "H1", {"applied": "close", "convention": "talib", "kind": "bw_mfi", "settings": {"shape": "none"}}, limit=5)
print("times:", values["times"])
for line in values["lines"]:
print("line:", line["line"])
print(" newest values:", line["values"])JavaScript
const values = await client.study.values({ bench, symbol: market, timeframe: "H1", study: { "applied": "close", "convention": "talib", "kind": "bw_mfi", "settings": { "shape": "none" } }, limit: 5 });
console.log("times:", values.times);
for (const line of values.lines) {
console.log("line:", line.line);
console.log(" newest values:", line.values);
}C#
var values = await client.Study.Values(bench, market, "H1", new Dictionary<string, object?> { ["applied"] = "close", ["convention"] = "talib", ["kind"] = "bw_mfi", ["settings"] = new Dictionary<string, object?> { ["shape"] = "none" } }, limit: 5);
Console.WriteLine($"times: {values!["times"]!}");
foreach (var line in values!["lines"]!.AsArray())
{
Console.WriteLine($"line: {line!["line"]!}");
Console.WriteLine($" newest values: {line!["values"]!}");
}Go
values := must(client.Study.Values(ctx, mcp.StudyValuesArgs{Bench: bench, Symbol: market, Timeframe: "H1", Study: map[string]any{"applied": "close", "convention": "talib", "kind": "bw_mfi", "settings": map[string]any{"shape": "none"}}, Limit: mcp.Ptr[int64](5)}))
fmt.Println("times:", at(values, "times"))
for _, line := range at(values, "lines").([]any) {
fmt.Println("line:", at(line, "line"))
fmt.Println(" newest values:", at(line, "values"))
}Java
Object values = client.study.values(new Bentrix.StudyApi.ValuesArgs(bench, market, "H1", obj("applied", "close", "convention", "talib", "kind", "bw_mfi", "settings", obj("shape", "none"))).limit(5L));
System.out.println("times:" + " " + at(values, "times"));
for (Object line : (List<Object>) at(values, "lines")) {
System.out.println("line:" + " " + at(line, "line"));
System.out.println(" newest values:" + " " + at(line, "values"));
}C++
auto values = client.study.values_(StudyApi::ValuesArgs(bench, market, "H1", Json::Object{{"applied", "close"}, {"convention", "talib"}, {"kind", "bw_mfi"}, {"settings", Json::Object{{"shape", "none"}}}}).limit(5));
std::cout << "times:" << " " << values["times"].dump() << std::endl;
for (const Json &line : values["lines"].arr()) {
std::cout << "line:" << " " << line["line"].dump() << std::endl;
std::cout << " newest values:" << " " << line["values"].dump() << std::endl;
}Julia
values = client.study.values(bench, market, "H1", Dict{String,Any}("applied" => "close", "convention" => "talib", "kind" => "bw_mfi", "settings" => Dict{String,Any}("shape" => "none")); limit = 5)
println("times:", " ", values["times"])
for line in values["lines"]
println("line:", " ", line["line"])
println(" newest values:", " ", line["values"])
endR
values <- client$study$values(bench, market, "H1", list(applied = "close", convention = "talib", kind = "bw_mfi", settings = list(shape = "none")), limit = 5)
cat("times:", format(values$times), "\n")
for (line in values$lines) {
cat("line:", format(line$line), "\n")
cat(" newest values:", format(line$values), "\n")
}Rust
let values = client.study().values(mcp::StudyValuesArgs::new(bench.clone(), market.clone(), "H1", serde_json::json!({"applied": "close", "convention": "talib", "kind": "bw_mfi", "settings": {"shape": "none"}})).limit(5))?;
println!("times: {}", values["times"]);
for line in values["lines"].as_array().into_iter().flatten() {
println!("line: {}", line["line"]);
println!(" newest values: {}", line["values"]);
}Reading the answer
times— the candles’ open times, in milliseconds since 1970 (UTC), oldest first.lines— one entry per line, in this order, each with itslinename and itsvalues;values[i]belongs to the candle attimes[i].- The last value is the candle at the clock’s, which may still be forming: it changes until that candle closes, as on the chart. Nothing after the clock is ever computed.
nullis a candle with no value yet — the warm-up, about 1 × the period at the start of the history.
line | What it is |
|---|---|
Main | the indicator's own value |
In a strategy
Filed under a key of your choice in a strategy document’s studies — here bw_mfi: {"bw_mfi": {"applied": "close", "convention": "talib", "kind": "bw_mfi", "settings": {"shape": "none"}}} — its rules can name:
| Write | What it is |
|---|---|
bw_mfi | its main line, as a value in a compare |
{"cond": "bw_mfi:line.turns_up"} | a condition it declares itself |
{"cond": "bw_mfi:line.turns_down"} | a condition it declares itself |
{"cond": "bw_mfi:line.rising"} | a condition it declares itself |
{"cond": "bw_mfi:line.falling"} | a condition it declares itself |
19Sources
- Williams, Bill. Trading Chaos. Wiley, 1995.
Bentrix 0.1.382Every number, name and default on these pages is read from the application itself.What is comingWhat changed