Indicator · Pine Script v6 · On the chart

Smart Trend Dashboard Pro

by vedkanani123· code credited to JohnsonForexTrader

A price-chart indicator that plots a 9 and a 21 period EMA and prints a buy label on a bullish crossover when RSI is below the overbought level, and a sell label on a bearish crossover when RSI is above the oversold level.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code89
Settings11inputs
LicenceNone statedfile: MPL-2.0
Last update2 months ago23 Aug 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

89 lines of Pine Script v6 from indicator/olg_7_6_26/ALL_2/codex/indicator/Smart Trend Dashboard Pro_2.txt, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

Smart Trend Dashboard Pro_2.txt
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © JohnsonForexTrader

//@version=6
indicator("Smart Trend Dashboard Pro", overlay=true, max_labels_count=500)

// ============ INPUTS ============
grpTrend = "Trend Settings"
fastLen   = input.int(9,  title="Fast EMA Length", group=grpTrend)
slowLen   = input.int(21, title="Slow EMA Length", group=grpTrend)
rsiLen    = input.int(14, title="RSI Length", group=grpTrend)
rsiOB     = input.int(70, title="RSI Overbought", group=grpTrend)
rsiOS     = input.int(30, title="RSI Oversold", group=grpTrend)

grpVis = "Visual Settings"
showBG      = input.bool(true, title="Trend Background", group=grpVis)
showCandles = input.bool(true, title="Color Candles by Trend", group=grpVis)
showTable   = input.bool(true, title="Show Dashboard Table", group=grpVis)
tablePos    = input.string("Top Right", title="Table Position", options=["Top Right", "Top Left", "Bottom Right", "Bottom Left"], group=grpVis)

grpMTF = "Multi-Timeframe"
htf1 = input.timeframe("60",  title="Higher Timeframe 1", group=grpMTF)
htf2 = input.timeframe("240", title="Higher Timeframe 2", group=grpMTF)

// ============ CALCULATIONS ============
fastEMA = ta.ema(close, fastLen)
slowEMA = ta.ema(close, slowLen)
rsiVal  = ta.rsi(close, rsiLen)

bullCross = ta.crossover(fastEMA, slowEMA)
bearCross = ta.crossunder(fastEMA, slowEMA)

buySignal  = bullCross and rsiVal < rsiOB
sellSignal = bearCross and rsiVal > rsiOS

trendUp = fastEMA > slowEMA

// Multi-timeframe trend check
f_mtfTrend(tf) =>
    [fEma, sEma] = request.security(syminfo.tickerid, tf, [ta.ema(close, fastLen), ta.ema(close, slowLen)])
    fEma > sEma

mtf1Up = f_mtfTrend(htf1)
mtf2Up = f_mtfTrend(htf2)

// ============ PLOTS ============
plot(fastEMA, title="Fast EMA", color=color.new(color.blue, 0), linewidth=2)
plot(slowEMA, title="Slow EMA", color=color.new(color.orange, 0), linewidth=2)

plotshape(buySignal, title="Buy Signal", style=shape.labelup, location=location.belowbar,
     color=color.new(color.green, 0), text="BUY", textcolor=color.white, size=size.small)

plotshape(sellSignal, title="Sell Signal", style=shape.labeldown, location=location.abovebar,
     color=color.new(color.red, 0), text="SELL", textcolor=color.white, size=size.small)

bgcolor(showBG ? (trendUp ? color.new(color.green, 92) : color.new(color.red, 92)) : na)

barcolor(showCandles ? (trendUp ? color.new(color.green, 30) : color.new(color.red, 30)) : na)

// ============ DASHBOARD TABLE ============
getPos(p) =>
    switch p
        "Top Right" => position.top_right
        "Top Left" => position.top_left
        "Bottom Right" => position.bottom_right
        "Bottom Left" => position.bottom_left
        => position.top_right

var table dash = table.new(getPos(tablePos), 2, 5, border_width=1)

if barstate.islast and showTable
    table.cell(dash, 0, 0, "Smart Trend Dashboard", text_color=color.white, bgcolor=color.new(color.blue, 20), text_size=size.small)
    table.cell(dash, 1, 0, "", bgcolor=color.new(color.blue, 20))

    table.cell(dash, 0, 1, "Current Trend", text_color=color.white, bgcolor=color.new(color.gray, 60), text_size=size.small)
    table.cell(dash, 1, 1, trendUp ? "BULLISH" : "BEARISH", text_color=color.white, bgcolor=trendUp ? color.new(color.green, 30) : color.new(color.red, 30), text_size=size.small)

    table.cell(dash, 0, 2, "RSI (" + str.tostring(rsiLen) + ")", text_color=color.white, bgcolor=color.new(color.gray, 60), text_size=size.small)
    table.cell(dash, 1, 2, str.tostring(math.round(rsiVal, 2)), text_color=color.white, bgcolor=color.new(color.gray, 70), text_size=size.small)

    table.cell(dash, 0, 3, "Trend " + htf1, text_color=color.white, bgcolor=color.new(color.gray, 60), text_size=size.small)
    table.cell(dash, 1, 3, mtf1Up ? "UP" : "DOWN", text_color=color.white, bgcolor=mtf1Up ? color.new(color.green, 30) : color.new(color.red, 30), text_size=size.small)

    table.cell(dash, 0, 4, "Trend " + htf2, text_color=color.white, bgcolor=color.new(color.gray, 60), text_size=size.small)
    table.cell(dash, 1, 4, mtf2Up ? "UP" : "DOWN", text_color=color.white, bgcolor=mtf2Up ? color.new(color.green, 30) : color.new(color.red, 30), text_size=size.small)

// ============ ALERTS ============
alertcondition(buySignal, title="Buy Alert", message="Smart Trend Dashboard: BUY signal on {{ticker}} at {{close}}")
alertcondition(sellSignal, title="Sell Alert", message="Smart Trend Dashboard: SELL signal on {{ticker}} at {{close}}")

Overview

Smart Trend Dashboard Pro tints the background and candles by trend direction and shows a dashboard table with the current trend, RSI and the EMA trend on two chosen higher timeframes. Lengths, RSI levels, timeframes and table position are adjustable.

Details

Published by

vedkanani123 on GitHub

Code credit

JohnsonForexTrader, as written in the script's header

Type

Indicator, Pine Script v6

Draws

On the price chart

Category

Moving averages, Trend, Screeners & dashboards

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.

Settings

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

SettingTypeDefaultVariable
Fast EMA Lengthint9fastLen
Slow EMA Lengthint21slowLen
RSI Lengthint14rsiLen
RSI Overboughtint70rsiOB
RSI Oversoldint30rsiOS
Trend BackgroundbooltrueshowBG
Color Candles by TrendbooltrueshowCandles
Show Dashboard TablebooltrueshowTable
Table PositionstringTop RighttablePos
Higher Timeframe 1timeframe60htf1
Higher Timeframe 2timeframe240htf2
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

218 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 3 months ago · None stated GitHub repository of TradersPost Trading Checklist
92 stars

This indicator plots five moving averages of a chosen source on the price chart, defaulting to EMA lengths 10, 20, 30, 40 and 50. The user can switch the average type to SMA, WMA or HMA and recolor each line. Wide translucent glows sit under the lines, and sof

Indicator v5 TrendMoving averages
Updated 2 months ago · Custom licence GitHub repository of Moon Dev Rainbow MA Ribbon 10-50

EMA Ribbon Overlay

by iamrichardD
57 stars

Calculates exponential moving averages for fast, pivot, and slow lengths along with optional 50, 100, and 200 simple moving average context lines. It visualizes bullish and bearish ribbon fills on the main price chart alongside MACD calculations to generate ea

Indicator v6 TrendMoving averages
Updated 1 year ago · Apache-2.0 GitHub repository of EMA Ribbon Overlay
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 2 months ago · MPL-2.0 GitHub repository of Candle Counter + MA + RSI + Mode
43 stars

This indicator evaluates market momentum and risk by calculating trend metrics and volatility stats, displaying them in an on-chart table pane. It measures short-term and long-term trend strength via two MACD configurations built on three customizable EMA leng

Indicator v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Trend Strength & Volatility

Market Monitor - 15m

by chris-c-thomas
14 stars

Market Monitor - 15m is a directional bias chart overlay designed for 15-minute intraday chart analysis. It calculates a triple exponential moving average ribbon with EMA cloud shading, session VWAP with multiplier bands, prior day levels, a 30-minute opening

Indicator v6 TrendMoving averages
Updated 6 months ago · MIT GitHub repository of Market Monitor - 15m

More indicators

Trade Your Charts With a Regulated Broker

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

Compare brokers