Force Index
Force Index, as MetaTrader computes it — the bar's volume times how far a moving average of the close moved since the bar before.
It measures direction, size and participation together in one number. Readings: the side of zero and the magnitude; it is in price times volume units and so is not comparable between instruments.
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. Force Index has no value on the first 13 — the bars it needs before it can answer — and its first value stands on bar 14. Its line runs between -1.18 and 1.21 on these bars, and the last value is 0.0974. Counting the conditions the study declares on these bars: crosses above 0 8 times; crosses below 0 8 times. Press a condition under the figure to see each place marked. As states rather than moments: is above 0 on 142 bars; is below 0 on 145 bars.
02Its parts, named
03What you see
A line in its own pane around zero: each bar's volume multiplied by the change of a moving average of the close. Large values mean the average moved a good deal on a bar of large volume; the sign is the direction the average moved.
04Where it comes from
Alexander Elder introduced the Force Index in Trading for a Living (1993). He combined the three pieces of a bar he considered essential — the direction of the change, its size, and the volume behind it — into one number.
05The formula
Forceₜ = Vₜ · (SMA(C, N)ₜ − SMA(C, N)_(t−1))
This is MetaTrader 5's form, which Bentrix computes: the bar's volume times the change of a moving average of the close. The Force Index here differs from Elder's Force Index, the study of Elder's own form: each bar's change of close times its volume, then smoothed by an EMA. Elder used two smoothings: 2 bars for a short, jumpy line and 13 bars for a longer one.
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.
Bentrix follows MetaTrader's form: the bar's volume times the change of a moving average of the close. Take a period of 3.
The 3-bar average of the close reads 24.33 on the seventh bar and 25.00 on the eighth: a change of 0.67.
Force = 170 × 0.67 = 113.3
On the bar before, the average went from 23.67 to 24.33 on a volume of 80: 80 × (0.67) = 53.3.
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("Force Index") length = input.int(13, "Length") average = ta.sma(close, length) // How far the average moved this bar, times the bar's volume. force = volume * (average - average[1]) plot(force, "Force") hline(0)
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
The 13-bar line above or below zero. Elder read it as the balance of volume-weighted change over the last few weeks of bars.
The 2-bar line's dips and spikes. Read for short-term timing within that balance.
Divergence. A new price high with a lower Force Index high is read as the move carrying less volume-weighted change.
How a spike fails. A tall bar says a large change met a large volume. The tallest readings come at climaxes — the end of a run as often as its start.
How the zero line fails. The sign is the sign of the average's change; with a short period it flips every few bars.
09In different markets and timeframes
The Force Index is direction, extent and volume in one number, in arbitrary units. Its spikes mark climactic bars; smoothed over 13 it follows the trend of force. 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
Elder read it with a 13-bar EMA of price for direction — the short Force Index for timing inside that trend.
11What it does not tell you
It is in price × volume units, not comparable between markets. On many forex feeds the volume is a tick count rather than traded volume; the index then weights by activity, not by money. 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
- 1Period — 13The period of the moving average whose change is multiplied by volume. Elder used 2 for short swings and 13 for the trend.
- 2Average — The study's ownThe kind of moving average inside the study. Left at the study's own, it is the one the study's calculation uses by itself.
- 3Timeframe — ChartThe chart's own by default; any higher one, read on the last closed candle. A finer one is never offered.
- 4Wait for the candle to close — OnThe value of a higher timeframe is taken only from a candle that has finished.
What each input changes
- AverageThe kind of average whose bar-to-bar change is multiplied by volume: simple (the default), exponential, smoothed or linear-weighted.
- In use2 and 13 are Elder's two settings.
13Limits and common misreadings
One large bar on heavy volume dominates the line for several bars.
Smoothing changes the meaning: the 2-bar and 13-bar lines answer different questions.
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 Force Index with 2 and with 13 bars. Step through a sharp move and note which bars' volumes made the largest spikes.
Open the laboratory17On pages of their own
18In Bentrix
- From the menu: a chart's Indicators button › Volume › Force Index, or type Force Index in its search.
- Its settings: the settings card opens when it is added; its legend's name opens it again.
19From 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": "force"}).
The study, as a chart files it
This is a new Force 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": "mt5",
"kind": "force",
"settings": {
"period": 13,
"shape": "period"
}
}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": "mt5",
"kind": "force",
"settings": {
"period": 13,
"shape": "period"
}
}
}
}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": "mt5", "kind": "force", "settings": {"period": 13, "shape": "period"}}, 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": "mt5", "kind": "force", "settings": { "period": 13, "shape": "period" } }, 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"] = "mt5", ["kind"] = "force", ["settings"] = new Dictionary<string, object?> { ["period"] = 13, ["shape"] = "period" } }, 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": "mt5", "kind": "force", "settings": map[string]any{"period": 13, "shape": "period"}}, 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", "mt5", "kind", "force", "settings", obj("period", 13, "shape", "period"))).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", "mt5"}, {"kind", "force"}, {"settings", Json::Object{{"period", 13}, {"shape", "period"}}}}).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" => "mt5", "kind" => "force", "settings" => Dict{String,Any}("period" => 13, "shape" => "period")); 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 = "mt5", kind = "force", settings = list(period = 13, shape = "period")), 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": "mt5", "kind": "force", "settings": {"period": 13, "shape": "period"}})).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.- Its fixed levels, drawn on the chart:
[0.0].
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 force: {"force": {"applied": "close", "convention": "mt5", "kind": "force", "settings": {"period": 13, "shape": "period"}}} — its rules can name:
| Write | What it is |
|---|---|
force | its main line, as a value in a compare |
{"cond": "force:level.cross_up:0"} | a condition it declares itself |
{"cond": "force:level.cross_down:0"} | a condition it declares itself |
{"cond": "force:level.above:0"} | a condition it declares itself |
{"cond": "force:level.below:0"} | a condition it declares itself |
20Sources
- Elder, Alexander. Trading for a Living. Wiley, 1993.
Bentrix 0.1.382Every number, name and default on these pages is read from the application itself.What is comingWhat changed