Bentrix Docs
HomePricingDashboard

Average Directional Index Rating ADXR

Trend strengthoscillatorone linein every package

The mean of today's ADX and the ADX from N−1 bars ago.

It measures the same trend strength as ADX, deliberately lagged and halved in responsiveness so that the reading changes less often. Read exactly as ADX, at a slower cadence.

01The study, live

Live figureScroll to zoom, drag the bars to pan.
2025
bar —O — H — L — C —main line —first value at —
Show where:

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. ADXR has no value on the first 40 — the bars it needs before it can answer — and its first value stands on bar 41. Its line runs between 17.51 and 58.15 on these bars, and the last value is 31.65. The pane's scale is fixed at 0 to 100, the range the study can take. Counting the conditions the study declares on these bars: crosses above 20 once; crosses below 20 once; crosses above 25 once; crosses below 25 once. Press a condition under the figure to see each place marked. As states rather than moments: is above 20 on 246 bars; is below 20 on 14 bars; is above 25 on 226 bars; is below 25 on 34 bars.

02Its parts, named

The bars it readseach bar's open, high, low and closeWarm-upno value on the first 40 bars: thestudy needs them before it cananswerThe main linethe study's own value on each barLevel 25a fixed reference the study is readagainstLevel 20a fixed reference the study is readagainst
Computed by Bentrix’s own code over the sample bars. It is drawn on once, as you reach the figure.

03What you see

ADXR averages today's ADX with the ADX of N bars ago — a smoother strength line.

ADXR is one line in a pane of its own, between 0 and 100, with levels at 20 and 25. It looks like the ADX drawn with a softer hand: the same hills, lower and later.

04Where it comes from

J. Welles Wilder introduced the Directional Movement System in his 1978 book. The ADX was his answer to a question his other studies could not answer: is there a trend at all?

05The formula

ADXR is the mean of two readings of the ADX of the same period: the current one, and the one N−1 bars earlier.

ADXRt=ADXt+ADXt−(N−1)2
ADXtthe ADX on this bar
ADXt−(N−1)the ADX N−1 bars earlier
Nthe period, in bars

The ADX itself is the smoothed size of the gap between the two directional lines; its own page has that formula.

06A worked example

ADXR needs no new arithmetic: it is the average of two ADX readings a period apart.

Take a period of 14. Suppose the ADX reads 32.0 on this bar and read 24.0 thirteen bars ago (the period less one).

ADXR = (32.0 + 24.0) / 2 = 28.0

It is below the ADX because the ADX has been rising. When the ADX has been falling — 24.0 now, 32.0 thirteen bars ago — ADXR is the same 28.0 and now stands above the ADX. The line is always pulled toward where the ADX used to be.

On real bars, with a period of 3: take ten bars with highs 21, 23, 22, 24, 23, 22, 24, 25, 23, 24, lows 19, 20, 20, 21, 21, 20, 21, 22, 21, 21 and closes 20, 22, 21, 23, 22, 21, 23, 24, 22, 23. The ADX reads 71.33, 54.62 and 51.71 on the last three bars, and ADXR on the last bar averages the newest reading with the one two bars before it (the period less one): (51.71 + 71.33) / 2 = 61.52.

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.

THE SCRIPT’S GRAPH
//@version=6
indicator("Average Directional Movement Index Rating")
length = input.int(14, "Length")
// The ADX, averaged with its own value `length` bars ago.
adxr = talib.ADXR(length)
plot(adxr, "ADXR")
hline(20)
hline(25)

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

ADXR above 20–25 is read, as with the ADX, as a market that has been trending; below 20 as one that has been ranging. Being an average of two ADX readings a period apart, it crosses those levels later than the ADX does.

A rising ADXR is read as trend strength having grown over the last two periods, in either direction.

ADX against ADXR. The ADX above its ADXR says the ADX has risen over the last period; below, that it has fallen. Wilder used the ADXR as a slow gauge for comparing markets. It fails as timing: it is the slowest line in the family, a smoothing of a smoothing averaged with its own past.

09In different markets and timeframes

ADXR is the slowest of the family — the ADX averaged with itself a period ago — and suits comparisons between markets more than timing in one. Wilder used it to rate which markets were trending enough to follow.

10With other studies

Read beside the ADX: the ADX above its ADXR has been rising. Wilder's Commodity Selection Index is built on it.

11What it does not tell you

!

ADXR has no direction: a strong fall raises it as much as a strong rise. It is the ADX — itself three layers of smoothing — averaged with its own past, and turns later still.

12Inputs and defaults

ADXR (14, Chart)settings card
1Period14
2TimeframeChart
3Wait for the candle to closeOn
  1. 1
    Period — 14Both the ADX's own period and how far back the second reading is taken. A longer period lengthens both, so the lag grows quickly.
  2. 2
    Timeframe — ChartThe chart's own by default; any higher one, read on the last closed candle. A finer one is never offered.
  3. 3
    Wait for the candle to close — OnThe value of a higher timeframe is taken only from a candle that has finished.

The settings in use

  • In use14; the look-back and the smoothing are the same number, so a longer period lengthens the lag twice over.

13Limits and common misreadings

ADXR is computed as TA-Lib computes it, on TA-Lib's ADX. MetaTrader 5 smooths its ADX differently, so an ADXR worked out from MetaTrader's ADX values differs from this line, most at the start.

14Conditions an alert or a strategy can watch

crosses above 20 eventcrosses below 20 eventis above 20 stateis below 20 statecrosses above 25 eventcrosses below 25 eventis above 25 stateis below 25 state

Event: the bar it happens on an event happens on one barState: every bar while it holds 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

Put ADX 14 and ADXR 14 in one pane and note where they cross; then look at what price had already done by each crossing.

Open the laboratory

17In Bentrix

  • From the menu: a chart's Indicators button › Trend strength › ADXR, or type ADXR 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": "adxr"}).

The study, as a chart files it

This is a new ADXR’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": "adxr",
  "settings": {
    "period": 14,
    "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": "talib",
      "kind": "adxr",
      "settings": {
        "period": 14,
        "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": "talib", "kind": "adxr", "settings": {"period": 14, "shape": "period"}}, limit=5)
print("times:", values["times"])
for line in values["lines"]:
    print("line:", line["line"])
    print("  newest values:", line["values"])

JSJavaScript

const values = await client.study.values({ bench, symbol: market, timeframe: "H1", study: { "applied": "close", "convention": "talib", "kind": "adxr", "settings": { "period": 14, "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#C#

var values = await client.Study.Values(bench, market, "H1", new Dictionary<string, object?> { ["applied"] = "close", ["convention"] = "talib", ["kind"] = "adxr", ["settings"] = new Dictionary<string, object?> { ["period"] = 14, ["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"]!}");
}

GOGo

values := must(client.Study.Values(ctx, mcp.StudyValuesArgs{Bench: bench, Symbol: market, Timeframe: "H1", Study: map[string]any{"applied": "close", "convention": "talib", "kind": "adxr", "settings": map[string]any{"period": 14, "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", "talib", "kind", "adxr", "settings", obj("period", 14, "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++C++

auto values = client.study.values_(StudyApi::ValuesArgs(bench, market, "H1", Json::Object{{"applied", "close"}, {"convention", "talib"}, {"kind", "adxr"}, {"settings", Json::Object{{"period", 14}, {"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" => "talib", "kind" => "adxr", "settings" => Dict{String,Any}("period" => 14, "shape" => "period")); limit = 5)
println("times:", " ", values["times"])
for line in values["lines"]
    println("line:", " ", line["line"])
    println("  newest values:", " ", line["values"])
end

RR

values <- client$study$values(bench, market, "H1", list(applied = "close", convention = "talib", kind = "adxr", settings = list(period = 14, 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")
}

RRust

let values = client.study().values(mcp::StudyValuesArgs::new(bench.clone(), market.clone(), "H1", serde_json::json!({"applied": "close", "convention": "talib", "kind": "adxr", "settings": {"period": 14, "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 its line name and its values; values[i] belongs to the candle at times[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.
  • null is 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: [20.0, 25.0].
lineWhat it is
Mainthe indicator's own value

In a strategy

Filed under a key of your choice in a strategy document’s studies — here adxr: {"adxr": {"applied": "close", "convention": "talib", "kind": "adxr", "settings": {"period": 14, "shape": "period"}}} — its rules can name:

WriteWhat it is
adxrits main line, as a value in a compare
{"cond": "adxr:level.cross_up:20"}a condition it declares itself
{"cond": "adxr:level.cross_down:20"}a condition it declares itself
{"cond": "adxr:level.above:20"}a condition it declares itself
{"cond": "adxr:level.below:20"}a condition it declares itself
{"cond": "adxr:level.cross_up:25"}a condition it declares itself
{"cond": "adxr:level.cross_down:25"}a condition it declares itself
{"cond": "adxr:level.above:25"}a condition it declares itself
{"cond": "adxr:level.below:25"}a condition it declares itself

19Sources

  1. Wilder, J. Welles Jr. New Concepts in Technical Trading Systems. Trend Research, 1978.

Bentrix 0.1.382Every number, name and default on these pages is read from the application itself.What is comingWhat changed