Indicator · Pine Script v6 · On the chart

MTF Trend Dashboard

by theonetrade

MTF Trend Dashboard evaluates multi-timeframe trend conditions using Fast EMA, Slow EMA, and RSI across five user-selected timeframes.

View on GitHub

GitHub stars34on the repository
Pine versionv6current
Lines of code102
Settings11inputs
LicenceMIT
Last update2 weeks ago8 Nov 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

102 lines of Pine Script v6 from assets/indicator/bit-exact/mtf_trend_dashboard_nq5T2c7S.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

mtf_trend_dashboard_nq5T2c7S.pine
//@version=6
indicator("MTF Trend Dashboard", shorttitle = "MTF Trend", overlay = true)

// ───────── Inputs ─────────
fastLen     = input.int(20, "Fast EMA", minval = 1, group = "Trend")
slowLen     = input.int(50, "Slow EMA", minval = 1, group = "Trend")
rsiLen      = input.int(14, "RSI Length", minval = 1, group = "Trend")
showSignals = input.bool(true, "Show EMA cross signals", group = "Trend")

tf1 = input.timeframe("5",   "Timeframe 1", group = "Dashboard")
tf2 = input.timeframe("15",  "Timeframe 2", group = "Dashboard")
tf3 = input.timeframe("60",  "Timeframe 3", group = "Dashboard")
tf4 = input.timeframe("240", "Timeframe 4", group = "Dashboard")
tf5 = input.timeframe("D",   "Timeframe 5", group = "Dashboard")
tablePos  = input.string("Top Right", "Dashboard position", options = ["Top Right", "Top Left", "Bottom Right", "Bottom Left"], group = "Dashboard")
tableSize = input.string("Small", "Text size", options = ["Tiny", "Small", "Normal"], group = "Dashboard")

// ───────── Trend logic ─────────
// 1 = bullish (price > fast EMA > slow EMA and RSI > 50)
// -1 = bearish (price < fast EMA < slow EMA and RSI < 50)
// 0 = neutral
trendState() =>
    f = ta.ema(close, fastLen)
    s = ta.ema(close, slowLen)
    r = ta.rsi(close, rsiLen)
    int st = 0
    if close > f and f > s and r > 50
        st := 1
    else if close < f and f < s and r < 50
        st := -1
    [st, r]

[s1, r1] = request.security(syminfo.tickerid, tf1, trendState())
[s2, r2] = request.security(syminfo.tickerid, tf2, trendState())
[s3, r3] = request.security(syminfo.tickerid, tf3, trendState())
[s4, r4] = request.security(syminfo.tickerid, tf4, trendState())
[s5, r5] = request.security(syminfo.tickerid, tf5, trendState())

score   = nz(s1) + nz(s2) + nz(s3) + nz(s4) + nz(s5)
allBull = score == 5
allBear = score == -5

// ───────── Chart plots ─────────
fastEma    = ta.ema(close, fastLen)
slowEma    = ta.ema(close, slowLen)
[stNow, _] = trendState()

trendCol = stNow == 1 ? color.teal : stNow == -1 ? color.red : color.gray
p1 = plot(fastEma, "Fast EMA", trendCol, 2)
p2 = plot(slowEma, "Slow EMA", color.new(trendCol, 40), 1)
fill(p1, p2, color.new(trendCol, 85), title = "EMA cloud")

bullCross = ta.crossover(fastEma, slowEma)
bearCross = ta.crossunder(fastEma, slowEma)
plotshape(showSignals and bullCross, "Bullish cross", shape.triangleup,   location.belowbar, color.teal, size = size.small)
plotshape(showSignals and bearCross, "Bearish cross", shape.triangledown, location.abovebar, color.red,  size = size.small)

// ───────── Alerts ─────────
alertcondition(bullCross, "Bullish EMA cross", "{{ticker}}: bullish EMA crossover on {{interval}}")
alertcondition(bearCross, "Bearish EMA cross", "{{ticker}}: bearish EMA crossover on {{interval}}")
alertcondition(allBull and not allBull[1], "All timeframes bullish", "{{ticker}}: all dashboard timeframes are bullish")
alertcondition(allBear and not allBear[1], "All timeframes bearish", "{{ticker}}: all dashboard timeframes are bearish")

// ───────── Dashboard ─────────
tPos = switch tablePos
    "Top Left"     => position.top_left
    "Bottom Right" => position.bottom_right
    "Bottom Left"  => position.bottom_left
    => position.top_right

tSize = switch tableSize
    "Tiny"   => size.tiny
    "Normal" => size.normal
    => size.small

var table dash = table.new(tPos, 3, 7, bgcolor = color.new(#0b1220, 10), border_color = color.new(color.gray, 70), border_width = 1)

tfName(string tf) =>
    sec = timeframe.in_seconds(tf)
    sec < 3600 ? str.tostring(math.round(sec / 60)) + "m" : sec < 86400 ? str.tostring(math.round(sec / 3600)) + "H" : tf

fillRow(int row, string tf, int st, float r) =>
    txt = st == 1 ? "▲ Bull" : st == -1 ? "▼ Bear" : "• Neutral"
    bg  = st == 1 ? color.new(color.teal, 30) : st == -1 ? color.new(color.red, 30) : color.new(color.gray, 60)
    table.cell(dash, 0, row, tfName(tf), text_color = color.white, text_size = tSize)
    table.cell(dash, 1, row, txt, bgcolor = bg, text_color = color.white, text_size = tSize)
    table.cell(dash, 2, row, na(r) ? "-" : str.tostring(r, "#.0"), text_color = color.white, text_size = tSize)

if barstate.islast
    table.cell(dash, 0, 0, "TF",    text_color = color.silver, text_size = tSize)
    table.cell(dash, 1, 0, "Trend", text_color = color.silver, text_size = tSize)
    table.cell(dash, 2, 0, "RSI",   text_color = color.silver, text_size = tSize)
    fillRow(1, tf1, s1, r1)
    fillRow(2, tf2, s2, r2)
    fillRow(3, tf3, s3, r3)
    fillRow(4, tf4, s4, r4)
    fillRow(5, tf5, s5, r5)
    bias   = score >= 3 ? "Bullish bias" : score <= -3 ? "Bearish bias" : "Mixed"
    biasBg = score >= 3 ? color.new(color.teal, 20) : score <= -3 ? color.new(color.red, 20) : color.new(color.gray, 50)
    table.cell(dash, 0, 6, "Score " + str.tostring(score) + "/5", text_color = color.white, text_size = tSize)
    table.cell(dash, 1, 6, bias, bgcolor = biasBg, text_color = color.white, text_size = tSize)
    table.merge_cells(dash, 1, 6, 2, 6)

Overview

A timeframe is classified as bullish when price is above the Fast EMA, Fast EMA is above the Slow EMA, and RSI is above 50, or bearish for the inverse. The indicator plots an EMA cloud and crossover signals on the price chart while rendering an on-screen table that summarizes trend alignment across all monitored timeframes.

Details

Published by

theonetrade on GitHub

Draws

On the price chart

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Topics

algorithmic-tradingbacktestingbitcoinccxtcrypto-tradingllm-agentoffline-backtestingopen-source-tradingpine-scriptpine-to-pythonpinescriptpynecorepythonquantquantitative-financestrategy-backtestingtechnical-analysistrading-indicatorstrading-strategiestradingview

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Fast EMAint20fastLen
Slow EMAint50slowLen
RSI Lengthint14rsiLen
Show EMA cross signalsbooltrueshowSignals
Timeframe 1timeframe5tf1
Timeframe 2timeframe15tf2
Timeframe 3timeframe60tf3
Timeframe 4timeframe240tf4
Timeframe 5timeframeDtf5
Dashboard positionstringTop RighttablePos
Text sizestringSmalltableSize
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

228 stars

TradersPost Trading Checklist is an overlay indicator that evaluates a suite of popular technical conditions for long and short trade setups. It checks session-anchored VWAP, fast and slow EMA alignments and crosses, 200 SMA, RSI overbought or oversold conditi

Indicator v6 Screeners & dashboardsTrend
Updated 4 months ago · None stated GitHub repository of TradersPost Trading Checklist
53 stars

This indicator analyzes historical candle direction and price range over a configurable lookback window to gauge market trend. It categorizes trend direction using candle count, price range sum, or both. Signals are filtered using a Simple Moving Average to en

Indicator v6 TrendOscillators & momentum
Updated 3 months ago · MPL-2.0 GitHub repository of Candle Counter + MA + RSI + Mode

Pocket Scout - SPY/QQQ

by chris-c-thomas
13 stars

Pocket Scout - SPY/QQQ is a mobile-optimized intraday bias indicator designed for major US equity ETFs and indices. It overlays a 9/21/50 EMA ribbon, session VWAP, prior day high/low/close levels, and intraday high/low lines directly on the main price chart. T

Indicator v6 TrendOscillators & momentum Repaints
Updated 7 months ago · MIT GitHub repository of Pocket Scout - SPY/QQQ

Portfolio Backtester

by f-cksociety
11 stars

The script is a Pine Script v5 indicator that emulates strategy backtesting directly on the price chart. It evaluates modular entry strategies, trade directions, entry stop-loss types such as ATR multiples or fixed percentages, and a wide variety of trade filt

Indicator v5 TrendOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of Portfolio Backtester

ForexAlgo

by Harshil427
7 stars

ForexAlgo generates trade signals directly on the price chart using a primary leading indicator, such as the Range Filter, combined with modular confirmation filters. Traders can toggle multiple technical filters, including exponential moving average crosses,

Indicator v5 TrendOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of ForexAlgo

Apex Swing System V2.5

by omharde42
3 stars

This indicator combines a 200-period simple moving average, relative strength index, and Ichimoku cloud components to evaluate market conditions and generate bullish and bearish signals. It plots fixed trade levels including entry, stop loss, and multiple targ

Indicator v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Apex Swing System V2.5

More Trend scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers