Multi-Timeframe Trend Panel

Multi-Timeframe Trend Panel is a free indicator by DinexSpace for MT5 and TradingView. A panel showing trend direction on several timeframes at once.

Download .zipDetailed installation guide33.3 KB · 8 files · no sign-up

What Multi-Timeframe Trend Panel does

Multi-Timeframe Trend Panel is a free indicator by DinexSpace for MT5 and TradingView. A panel showing trend direction on several timeframes at once.

Enable JavaScript to see the chart.

Chart powered by TradingView Lightweight Charts™ (Apache-2.0 license). tradingview.com

The candles and indicator lines above come straight from the MT5 version running in the Strategy Tester (XAUUSD H1); nothing is recalculated in the browser. Press ▶ to replay bar by bar.

MT5 version

Multi-Timeframe Trend Panel shows, in one small panel, what a moving average is doing on four timeframes at once (M15, H1, H4 and D1 by default). You can see whether the timeframes agree without switching charts.

TradingView version

Multi-Timeframe Trend Panel shows, in one small table, what a moving average is doing on four timeframes at once (15 minutes, 1 hour, 4 hours and daily by default). You can see whether the timeframes agree without switching charts.

When to use it

Use it when you only want to trade when the timeframes agree.

Features and modes

Multi-Timeframe Trend Panel has 8 documented features, listed below.

MT5 version

How it works

  • For each timeframe the indicator reads the moving average (EMA 50 by default) on the last closed bar and on the bar a few bars before it (5 by default).
  • The change between the two is compared with ATR(14) of the same timeframe:
    • rising when the average went up by more than the flat threshold (0.25 × ATR by default);
    • falling when it went down by more than that;
    • flat when the change is smaller.
  • A second column shows whether the last closed bar finished above or below the average.
  • A third column shows the change as a multiple of ATR, to compare timeframes on one scale.
  • Only closed bars are used, so the states do not flicker while a bar is forming. The panel refreshes every few seconds.

TradingView version

How it works

  • For each timeframe the script reads the moving average (EMA 50 by default) on the last closed bar and on the bar a few bars before it (5 by default).
  • The change between the two is compared with ATR(14) of that timeframe:
    • rising when the average went up by more than the flat threshold (0.25 × ATR by default);
    • falling when it went down by more than that;
    • flat when the change is smaller.
  • A second column shows whether the last closed bar finished above or below the average.
  • A third column shows the change as a multiple of ATR, so you can compare timeframes on one scale.
  • Only closed bars are used, so the states do not flicker while a bar is forming.

Parameters

Multi-Timeframe Trend Panel has 10 inputs in the MT5 version and 9 in the TradingView version; every input and its default is listed below.

MT5 version

  • Timeframes: four slots.
  • Moving average: method (SMA, EMA, SMMA, LWMA), length, slope window, flat threshold in ATR.
  • Display: panel corner, refresh interval.

TradingView version

  • Timeframes: four slots.
  • Moving average: type (EMA or SMA), length, slope window, flat threshold in ATR.
  • Display: table position.
Multi-Timeframe Trend Panel inputs – MT5 version
InputDefaultLabel in MT5
Timeframes
InpTf1PERIOD_M15Timeframe 1
InpTf2PERIOD_H1Timeframe 2
InpTf3PERIOD_H4Timeframe 3
InpTf4PERIOD_D1Timeframe 4
Moving average
InpMethodMODE_EMAMethod
InpLen50Length
InpSlope5Slope window (bars)
InpFlat0.25Flat if change < x ATR(14)
Display
InpCornerCORNER_RIGHT_UPPERPanel corner
InpRefresh5Refresh every (seconds)
Multi-Timeframe Trend Panel inputs – TradingView version
InputDefault
Timeframes
TF 1"15"
TF 2"60"
TF 3"240"
TF 4"D"
Moving average
Type"EMA"
Length50
Slope window (bars)5
Flat if change < x ATR(14)0.25
Display
Table position"Top right"

Signals

Multi-Timeframe Trend Panel does not generate buy or sell signals. It is an analysis tool: you read what it plots and make your own decisions.

Alerts

No. Multi-Timeframe Trend Panel has no built-in alerts.

Buffers for Expert Advisors

No. Multi-Timeframe Trend Panel draws chart objects (lines, boxes, labels or a panel) and has no indicator buffers for EAs.

Timeframes and markets

Multi-Timeframe Trend Panel runs on any chart timeframe. Its calculation reads the chart timeframe or a fixed timeframe (for example D1 or a higher timeframe), as described under Features.

Limitations

Multi-Timeframe Trend Panel is an analysis tool, not a trading system. Its documented limitations are listed below.

MT5 version

  • A moving average follows price with a delay. The states describe the recent past, not the next move.
  • Different lengths and thresholds give different states; there is no single "correct" setting.
  • On first use the terminal may need a moment to load history for the other timeframes; "n/a" is shown until then.

The indicator is a status display only. It does not trade, give signals or use DLLs or web requests.

TradingView version

  • A moving average follows price with a delay. The states describe the recent past, not the next move.
  • Different lengths and thresholds give different states; there is no single "correct" setting.
  • It is a status display only. The script does not say when to buy or sell.

This script is an analysis aid only. It does not give trade signals or investment advice.

Pine Script code

Paste the whole script into the Pine Editor on TradingView.

mtf_trend_panel.pine · 68 lines
//@version=6
// DinexSpace | Multi-Timeframe Trend Panel
// For four timeframes (15m, 1h, 4h, 1D by default) shows whether a moving average is rising, falling or flat,
// and whether price is above or below it, on closed bars only. "Flat" means the average moved less than a
// set fraction of ATR over the slope window. A status table only; it gives no buy or sell signals.
// Free and open source. License: MIT. (c) 2026 DinexSpace
indicator("DinexSpace | Multi-Timeframe Trend Panel", shorttitle = "DNX MTF Trend", overlay = true)

// ===== Brand colours =====
C_GREEN = #00FF7F   // SpringGreen: rising
C_AQUA  = #00FFFF   // Aqua: falling
C_GRAY  = #9AA0A6   // flat

// ===== Inputs =====
GRP_T  = "Timeframes"
tf1    = input.timeframe("15", "TF 1", group = GRP_T)
tf2    = input.timeframe("60", "TF 2", group = GRP_T)
tf3    = input.timeframe("240", "TF 3", group = GRP_T)
tf4    = input.timeframe("D", "TF 4", group = GRP_T)
GRP_M  = "Moving average"
maType = input.string("EMA", "Type", options = ["EMA", "SMA"], group = GRP_M)
maLen  = input.int(50, "Length", minval = 2, maxval = 500, group = GRP_M)
slopeN = input.int(5, "Slope window (bars)", minval = 1, maxval = 100, group = GRP_M)
flatK  = input.float(0.25, "Flat if change < x ATR(14)", minval = 0.0, step = 0.05, group = GRP_M)
GRP_D  = "Display"
tblPos = input.string("Top right", "Table position", options = ["Top right", "Top left", "Bottom right", "Bottom left"], group = GRP_D)

// Values of the last closed bar on `tf`: MA now, MA `slopeN` bars earlier, ATR(14), close.
calc() =>
    float s = ta.sma(close, maLen)          // both computed on every bar, then one is chosen
    float e = ta.ema(close, maLen)
    float m = maType == "SMA" ? s : e
    [m[1], m[1 + slopeN], ta.atr(14)[1], close[1]]

[m1, p1, a1, c1] = request.security(syminfo.tickerid, tf1, calc(), lookahead = barmerge.lookahead_on)
[m2, p2, a2, c2] = request.security(syminfo.tickerid, tf2, calc(), lookahead = barmerge.lookahead_on)
[m3, p3, a3, c3] = request.security(syminfo.tickerid, tf3, calc(), lookahead = barmerge.lookahead_on)
[m4, p4, a4, c4] = request.security(syminfo.tickerid, tf4, calc(), lookahead = barmerge.lookahead_on)

tPos = switch tblPos
    "Top left"     => position.top_left
    "Bottom right" => position.bottom_right
    "Bottom left"  => position.bottom_left
    => position.top_right
var table tbl = table.new(tPos, 4, 7, bgcolor = color.new(color.black, 10), border_color = color.new(color.gray, 70), border_width = 1)

row(int r, string tf, float m, float p, float a, float c) =>
    float d = m - p
    bool ok = not na(m) and not na(p) and not na(a)
    string st = not ok ? "n/a" : math.abs(d) < flatK * a ? "flat" : d > 0 ? "rising" : "falling"
    color col = st == "rising" ? C_GREEN : st == "falling" ? C_AQUA : C_GRAY
    string pos = not ok or na(c) ? "-" : c >= m ? "above" : "below"
    table.cell(tbl, 0, r, tf, text_color = color.white, text_size = size.small, text_halign = text.align_left)
    table.cell(tbl, 1, r, st, text_color = col, text_size = size.small)
    table.cell(tbl, 2, r, pos, text_color = C_GRAY, text_size = size.small)
    table.cell(tbl, 3, r, ok ? str.tostring(d / a, "+0.00;-0.00") : "-", text_color = C_GRAY, text_size = size.small)

if barstate.islast
    table.cell(tbl, 0, 0, "TF", text_color = color.gray, text_size = size.small, text_halign = text.align_left)
    table.cell(tbl, 1, 0, maType + str.tostring(maLen), text_color = color.gray, text_size = size.small)
    table.cell(tbl, 2, 0, "Close vs MA", text_color = color.gray, text_size = size.small)
    table.cell(tbl, 3, 0, "Slope/ATR", text_color = color.gray, text_size = size.small)
    row(1, tf1, m1, p1, a1, c1)
    row(2, tf2, m2, p2, a2, c2)
    row(3, tf3, m3, p3, a3, c3)
    row(4, tf4, m4, p4, a4, c4)
    table.cell(tbl, 0, 5, "Closed bars only", text_color = C_GRAY, text_size = size.tiny, text_halign = text.align_left)
    table.cell(tbl, 0, 6, "DinexSpace", text_color = C_GREEN, text_size = size.tiny, text_halign = text.align_left)

Multi-Timeframe Trend Panel FAQ

Multi-Timeframe Trend Panel is free, runs on MT5 and TradingView and does not place trades.

Is Multi-Timeframe Trend Panel free?

Yes. Multi-Timeframe Trend Panel is free to download from this page with no sign-up, and the download includes the full source code.

Which platforms does Multi-Timeframe Trend Panel run on?

Multi-Timeframe Trend Panel is available for MetaTrader 5 (MQL5) and TradingView (Pine Script v6).

Does Multi-Timeframe Trend Panel give buy and sell signals?

Multi-Timeframe Trend Panel does not generate buy or sell signals. It is an analysis tool: you read what it plots and make your own decisions.

Does Multi-Timeframe Trend Panel have alerts?

No. Multi-Timeframe Trend Panel has no built-in alerts.

Can an EA read Multi-Timeframe Trend Panel?

No. Multi-Timeframe Trend Panel draws chart objects (lines, boxes, labels or a panel) and has no indicator buffers for EAs.

Which timeframes does Multi-Timeframe Trend Panel work on?

Multi-Timeframe Trend Panel runs on any chart timeframe. Its calculation reads the chart timeframe or a fixed timeframe (for example D1 or a higher timeframe), as described under Features.

Does Multi-Timeframe Trend Panel place trades?

No. It is a read-only indicator: it only reads market data and shows the result on the chart or writes it to a file. The source contains no calls that open, close or modify orders.

How do I install Multi-Timeframe Trend Panel?

Download the .zip and follow the step-by-step installation guide for MT5 and TradingView: https://indicators.dinexspace.com/install-guide/

Measured win rates (backtest)

Being measured: the Python measurement does not yet match the MT5 signal count; being reconciled.

  • Costs: Real spread of an ECN-type MT5 account, no commission.
  • Data source: MT5 tick data (BNB: Binance spot).

TradingView H4/D1 bars may follow the exchange time zone of the TradingView symbol, not the MT5 server time (UTC) used for the measurement; sessions and the H4 trend may differ on the Pine version. Same signals on TradingView not checked yet.

Past test statistics are not a promise of future results.

More in this category

All Trend indicators

Aroon

Trend · Indicator

Counts the bars since the most recent highest high and lowest low. Use it to tell whether a trend is just starting or running out of steam.

FreeMT5Measured

ATR Trailing Stop Line

Trend · Indicator

An ATR-based trailing stop line that follows price and flips colour when the trend reverses. Use it to ride a trend and know when to get out.

FreeMT5TradingViewMeasured

Heikin Ashi Smoothed

Trend · Indicator

Smoothed Heikin Ashi candles that filter out much of the noise. Use them to see whether a trend is continuing or losing steam.

FreeMT5TradingViewMeasured