ProIndicatr Pro: 4 Pro indicators
indicator.trading
All scripts

Free · Open source

Trend Regime Meter

ADX, +DI and −DI in one clear state – so you know whether trend following or range trading is called for right now.

Type
Trend filter (separate pane)
Replaces
ADX · DMI
Recommended
Daily chart, 4h
Price
Free, open source
Open chart on TradingView
Trend Regime Meter below the gold daily chart with color-coded ADX line, DI histogram, background shading by state and a table
Trend Regime Meter below the gold daily chart with color-coded ADX line, DI histogram, background shading by state and a table

Trend Regime Meter turns the three lines of ADX and DMI into one clear answer: uptrend, downtrend, range, trend building or trend fading. The ADX line takes on the color of the state, a histogram shows which side has the upper hand, and a table sums it all up. You can use it on its own or as a filter for other tools. This page explains every feature – and above all, what you do with it and why.

Overview

At a glance

What does it do?

It assigns every candle a state – trend up or down, range, building or fading – and shows it as a color, as background shading and in a table.

What do I do with it?

You pick your tool based on the state: in a trend you trade with the direction, in a range you rather trade the return to the middle, while a trend is building you get ready.

Why?

The most common ADX mistake: a high ADX means “strong trend”, but not in which direction. Only together with +DI and −DI does it become a statement – and that’s exactly what the script does for you.

What do I get?

Less trend following in sideways phases, fewer range trades against strong trends – in other words, fewer trades in the wrong environment.

On your chart in 3 minutes

Quickstart

  1. 01

    Open the script page

    The button at the top of this page takes you to the script page on TradingView. The script is free and open source – you can read the code there too.

  2. 02

    Add it to your favorites

    On the script page, click Add to favorites (the star icon).

  3. 03

    Add it to your chart

    At the top of the chart, click Indicators, choose Favorites on the left and click Trend Regime Meter. Alternatively, search for “Indicatr” in the same window. The meter opens in its own pane below price.

  4. 04

    Pick a market and timeframe

    Start with a market that has clear phases, for example gold, the S&P 500 or Bitcoin, on the daily chart or on 4h. The defaults (DI 14, ADX 14, trend from 25, end below 20) are the classic values.

The chart explained

What you see on the chart

Gold (XAU/USD), daily chart. The numbers belong to the list below.Open chart on TradingView
All elements of Trend Regime Meter on the chart, numbered
All elements of Trend Regime Meter on the chart, numbered
  1. 1Uptrend Dark green ADX line: trend up, trend strength rising.
  2. 2Fading Lighter color: the trend is still on, but ADX is falling.
  3. 3Trend building Amber line: no trend yet, but ADX is rising.
  4. 4Downtrend Red ADX line: trend down.
  5. 5Range Gray line: no trend.
  6. 6DI histogram +DI minus −DI: above zero buyers have the upper hand, below zero sellers.
  7. 7Trend thresholds Dashed at 25 (trend starts), dotted at 20 (trend ends).
  8. 8Table State, duration, ADX with its direction and both DI values.

Elements 1 to 5

The six states

Every candle gets exactly one state. Direction comes from +DI and −DI, strength from ADX and its slope.

Gold, daily chart, September 2025 to April 2026. Building (amber), uptrend (dark green), fading (light), range (gray), building and uptrend again – in March the direction turns down.Open chart on TradingView
Trend Regime Meter on gold, September 2025 to April 2026: amber building, dark green uptrend, lighter fading, gray range, building and uptrend again, then a downtrend
Trend Regime Meter on gold, September 2025 to April 2026: amber building, dark green uptrend, lighter fading, gray range, building and uptrend again, then a downtrend
StateColorWhat it meansWhat you do with it
UptrendDark greenTrend up, ADX rising or steady.Trend following long: buy pullbacks, no shorts against the trend.
Uptrend, fadingLight greenThe uptrend is still on, but ADX is falling.No late entries, protect profits. This isn’t a reversal yet.
DowntrendRedTrend down, ADX rising or steady.Trend following short – or, as a long-only trader, wait.
Downtrend, fadingLight redThe downtrend is still on, but ADX is falling.Protect shorts, no late shorts.
Trend building (up / down)AmberNo trend yet, but ADX is rising and above 15 – with the likely direction.Get ready: mark levels, set an alert. Not a confirmed trend yet.
RangeGrayNo trend, and ADX isn’t building up either.Pause trend following, rather trade the return to the middle – or don’t trade at all.

Element 6

The DI histogram: who has the upper hand?

The columns show +DI minus −DI. Above zero (green) upward pressure is greater, below zero (red) downward pressure. The taller the columns, the more clearly one side is ahead.

What does it do?

It shows direction as a single number instead of two lines that keep crossing.

What do I do with it?

You check whether the trend is carried by a clear majority. If ADX and the columns grow together, the trend is gaining strength.

Why?

A rising ADX with shrinking columns often means the move is getting more hectic, but not more one-sided.

What do I get?

You notice early when the other side gets stronger – even before the state changes.

Element 7

Two thresholds instead of one: trend on, trend off

A trend only starts when ADX rises above 25 (dashed line) and only ends when it falls below 20 (dotted line). In between, the last state stays in place.

The gap between the two thresholds protects against the typical flickering of ADX around a single value. You get fewer, but clearer state changes.

Element 8

Reading the table

Gold, daily chart. Downtrend for one candle (previously “Downtrend, fading”), ADX 24.4 and rising, −DI well above +DI.Open chart on TradingView
Trend Regime Meter table: Regime Downtrend, Bars in regime 1, ADX 24.4 rising, +DI / -DI 15.8 / 30.1
Trend Regime Meter table: Regime Downtrend, Bars in regime 1, ADX 24.4 rising, +DI / -DI 15.8 / 30.1
RowWhat it tells you
RegimeThe current state in words, in the color of the state.
Bars in regimeHow many candles the state has lasted. If, for example, “Downtrend, fading” switches back to “Downtrend”, the count starts again.
ADXCurrent ADX with its direction: rising, falling or flat – compared with the value a few candles earlier.
+DI / -DIThe two direction lines. Their difference is the histogram.

In practice

How to work with the script

  1. 01

    State on the higher timeframe

    Put the meter on your market’s daily chart. It’s your frame for all smaller timeframes.

  2. 02

    Pick your tool

    Uptrend / Downtrend: trend following in that direction. Range: return to the middle, or pause. Trend building: get ready. Fading: no late entries.

  3. 03

    Setup on your trading timeframe

    You look for the entry with your own setup. The meter gives no entry signals – it tells you what kind of setup fits right now.

  4. 04

    Check the context

    Scheduled events (central banks, jobs data, inflation, earnings), major levels and related markets.

  5. 05

    Set stop and size

    Stop according to your setup, always the same risk per trade, for example 0.5 to 1% of the account.

  6. 06

    Watch for state changes

    An alert on Any regime change or Range started tells you when the environment changes.

Recommendations

Which markets fit – and which don’t

The meter only uses high, low and close – it doesn’t need volume. Technically it works on any market. The question is where states last long enough for you to act on them. And to be honest: on difficult markets the meter mostly just shows “Range”. What loses there isn’t the meter, it’s trend following.

MarketTimeframeFitWhy
GoldDaily, 4hLong, macro-driven phases – trends and ranges last weeks to months. Easy-to-read transitions.
S&P 500 / NasdaqDailyClear trend phases and corrections. On small timeframes, indices often revert to the middle.
BitcoinDaily, 4hPronounced trends in both directions and long sideways phases in between – exactly what the meter is for.
EUR/USDDailyTrends over weeks, but lots of range. The fact that the meter often shows “Range” is useful information.
Large-cap stocksDailyClean trends, but gaps after earnings: ADX only confirms days later.
GBP/NZD4h, dailyMostly “Range” – correctly identified. Useful as a filter, hardly any trend-following opportunities.
All markets below 15 minutes–By the time a state is confirmed, the move is often over. Session opens distort the values.

Assessment based on market characteristics and behavior on the chart, not a backtest. ●●● good fit, ●●○ with limitations, ●○○ difficult.

Good examples: gold and Bitcoin

Gold

Daily chart and 4h

Good fit
  • Long phases: gold often moves in one direction for months, driven by the dollar, real yields and central-bank buying – and then pauses for weeks. The meter clearly picks up both.
  • Readable transitions: on the chart above you can see the whole cycle – building in September 2025, uptrend, fading, range, building again, later downtrends.
  • High liquidity: clean candles, ADX isn’t distorted by thin trading.

Bitcoin

Daily chart and 4h

Good fit
  • Strong trends in both directions: clear phases for long and short alike.
  • Long sideways phases in between: that’s exactly where the meter keeps you away from trend-following trades.
  • Continuous trading without overnight gaps – the values build up evenly.

With limitations and difficult

GBP/NZD

4h and daily chart

Use with care
  • To be honest, the meter works correctly here: it mostly shows “Range” or a build-up that doesn’t get confirmed.
  • Useful as a filter: it keeps you from trend following in this pair.
  • But: two central banks and a commodity currency cause sudden spikes that trigger a short trend and end quickly. On top of that come wide spreads.

Very small timeframes (1 to 5 minutes)

all markets

Poor fit
  • Lag: ADX smooths over many candles. By the time a trend is confirmed, the short move is often already over.
  • Session opens and news create spikes that briefly push ADX up and produce build-up phases that lead nowhere.
  • Noise: many state changes a day – the meter turns into a traffic light that keeps switching.

Which timeframe?

  • Daily chart: the main use. States last for weeks – ideal as a frame for every decision.
  • 4h: good for swing traders on liquid markets, ideally with the daily chart as a check.
  • 1h: possible as a filter for intraday trades, but with more changes. Use the daily chart as the higher frame.
  • Below 15 minutes: not recommended – the lag of ADX weighs too heavily.

Both directions

Long and short

The meter treats both directions the same: uptrend and downtrend, each with “fading”, plus trend building with the likely direction up or down. On the gold chart you can see both – the uptrend in autumn 2025 and several downtrends from March 2026.

The part that makes the difference

How to manage the trades

Before the entry

  • Environment first, then the setup. If your setup doesn’t fit the state – trend following in a range, a mean-reversion trade against a strong trend – you skip it.
  • Check the calendar. Before central-bank decisions, jobs and inflation data or earnings, you’d rather skip new trades.
  • Check intermarket. Gold reacts to the dollar and real yields, tech stocks to bond yields, Bitcoin to risk sentiment in equity markets.
  • Size the position from the stop. Always the same risk per trade.

While the trade is running

  • “Fading” doesn’t mean “reversal”. The trend is losing strength. You protect your position, but you don’t automatically flip it.
  • Switch to “Range”: manage running trend-following trades more tightly, skip new ones.
  • “Trend building” is an early warning. Not every one of these phases gets confirmed. If you wait for “Uptrend” or “Downtrend”, you enter later, but with more confidence.

Over weeks and months

  • Note the state for every trade. After 30 to 50 trades you’ll see in which environment your method really makes money – and in which you’re better off pausing.

Don’t miss a thing

Setting up alerts

  1. 01

    Open the alert window

    At the top of the chart, click Alert or press Alt + A.

  2. 02

    Choose the condition

    Under Condition, select “Regime Meter [Indicatr]” and below it the alert you want.

  3. 03

    Trigger

    Choose “Once per bar close” – the state can still change on the current candle.

  4. 04

    Notification

    Choose app, email or webhook and save.

AlertWhen it fires
Uptrend startedAn uptrend begins. Doesn’t fire when a fading uptrend strengthens again.
Downtrend startedA downtrend begins – same logic.
Range startedA trend or build-up ends and the state switches to range.
Trend buildingA trend may be building: ADX is rising although no trend is confirmed yet.
Trend fadingADX is falling within a running trend.
Any regime changeEvery change of state.

Reference

All settings

Double-click the name “Regime Meter” at the top left of the meter’s pane to open the settings. Everything is on one page in three groups: ADX / DMI, Regime rules and Display.

ADX / DMI, regime rules and display

Trend Regime Meter settings: ADX / DMI, Regime rules and Display
Trend Regime Meter settings: ADX / DMI, Regime rules and Display
DI lengthDefault: 14
Period for +DI and −DI. Shorter = direction reacts faster but is noisier.
ADX smoothingDefault: 14
Smoothing of ADX. Shorter = states change earlier, but more often. Longer = calmer, but later.
Trend starts when ADX rises aboveDefault: 25
From this ADX level a trend begins (dashed line). Higher = fewer, but clearer trends.
Trend ends when ADX falls belowDefault: 20
Below this value a trend ends (dotted line). The gap to the start threshold prevents constant switching. If you set both values equal, this protection is gone.
ADX slope lookback (bars)Default: 3
How many candles back ADX is compared to determine “rising” or “falling”. Higher = slower, fewer switches between strong and “fading”.
Minimum DI spread to change directionDefault: 2
How far apart +DI and −DI must be for the direction to change. Higher = fewer direction changes on narrow crossings.
Trend building: ADX at leastDefault: 15
From which ADX level a rising ADX outside a trend counts as “Trend building”. Lower = earlier, but less reliable warnings.
Show DI spread histogramDefault: on
Show or hide the +DI minus −DI histogram.
Shade pane by regimeDefault: on
Color the pane background by state.
Colour price bars by regimeDefault: off
Colors the candles on the price chart by state – handy if you keep the meter’s pane small.
Show regime tableDefault: on
Show or hide the table at the top right.
Uptrend · Downtrend · Range · Building / fadingDefault: Green / Red / Gray / Amber
Colors of the states. “Fading” automatically uses a lighter version of the trend color – the “Building / fading” color only colors the build-up.

From practice

Common mistakes

  • High ADX = buy signal. ADX measures strength, not direction. Direction comes from +DI and −DI – which is exactly what the meter combines.
  • Reading “fading” as a reversal. A trend that’s losing strength can keep running for a long time.
  • Trading “trend building” like a confirmed trend. Not every build-up becomes a trend.
  • Using the meter as an entry signal. It describes the environment. Your setup provides the entry.
  • Using it on very small timeframes. The lag eats every move there.
  • Reacting on the current candle. The state is only fixed once the candle closes.

FAQ

Does the script repaint?

No. The state can still change on the current candle; once the candle closes, it’s fixed.

Why does the table show “Downtrend” although ADX is below 25?

Because a trend only ends below 20. Between 20 and 25 the last state stays in place – so the meter doesn’t flip on every small fluctuation.

How is it different from the built-in ADX and DMI?

The built-in indicators show three lines you have to combine yourself. The meter turns them into one state – with two thresholds against constant switching, a minimum spread for direction, separate states for building and fading, and a table.

Why is a trend confirmed so late?

ADX is a lagging indicator: it needs a few candles before a move becomes recognizable as a trend. “Trend building” is the earlier, but less certain warning.

Can I use it as a filter for other indicators?

Yes, that’s exactly what it’s for. For example: trend-following signals only in “Uptrend” or “Downtrend”, mean-reversion trades only in “Range”.

Is the script really free?

Yes. Trend Regime Meter is free and open source on TradingView. The button on this page takes you to the script page. After Add to favorites you’ll find it on the chart under Indicators → Favorites.

How do you like Trend Regime Meter?

Your vote tells us what to work on next.

Support

Report a problem or share feedback

Something off with the script, unclear in the docs, or you have an idea? Write to us. We reply by email.

Helps us check access or settings.

Only used to reply to you.

What is it about?

By sending, you agree that we use your details to handle your request. More in our privacy policy.

Trend Regime Meter

Turns ADX, +DI and −DI into one clear state: uptrend, downtrend, range, trend building or trend fading.

Open on TradingView

For educational and analytical purposes only. Not financial advice. States and marks are not recommendations to buy or sell. Past behavior is no guarantee of future results. Trading involves a risk of loss.

Trend Regime Meter – Documentation & Guide | indicator.trading