This indicator builds a compact multi-timeframe (MTF) dashboard that shows whether price is trading above or below a long-term moving average on several timeframes at once. It helps you quickly align trend bias across 5M, 15M, 1H, 4H, and Daily without switching charts.
//————————————————————–//
// INDICATOR: MTF_Trend_Dashboard
//————————————————————–//
DEFPARAM DrawOnLastBarOnly = true
// 1. DATA COLLECTION FROM MULTIPLE TIMEFRAMES
// Timeframe 1: 5 Minutes
TIMEFRAME(5 minutes)
sma5M = Average[200](close)
cond5M = close > sma5M
// Timeframe 2: 15 Minutes
TIMEFRAME(15 minutes)
sma15M = Average[200](close)
cond15M = close > sma15M
// Timeframe 3: 1 Hour
TIMEFRAME(1 hour)
sma1H = Average[200](close)
cond1H = close > sma1H
// Timeframe 4: 4 Hours
TIMEFRAME(4 hours)
sma4H = Average[200](close)
cond4H = close > sma4H
// Timeframe 5: Daily
TIMEFRAME(daily)
sma1D = Average[200](close)
cond1D = close > sma1D
Timeframe(default)
// 2. DASHBOARD RENDERING (Only on the last bar)
IF IsLastBarUpdate THEN
// Table Headers
//——————————————————————————————————————–
drawrectangle(-250,0,-10,-40) anchor(TopRight) coloured(“LightGray”) bordercolor(“Black”)
drawtext (” 5M | 15M | 1H | 4H | 1D “, -130,-10, SansSerif, Bold, 12) anchor(TopRight) coloured(“Black”)
//——————————————————————————————————————–
// Status Indicators (Row 1: Price vs 200 SMA)
// 5M
IF cond5M THEN
DRAWTEXT(” BULL “, -215, -25, SansSerif, Bold, 10) anchor(TopRight) coloured(“Green”)
ELSIF Not cond5M THEN
DRAWTEXT(” BEAR “, -215, -25, SansSerif, Bold, 10) anchor(TopRight) coloured(“Red”)
ENDIF
//
// 15M
IF cond15M THEN
DRAWTEXT(” BULL “, -170, -25, SansSerif, Bold, 10) anchor(TopRight) coloured(“Green”)
ELSIF Not cond15M THEN
DRAWTEXT(” BEAR “, -170, -25, SansSerif, Bold, 10) anchor(TopRight) coloured(“Red”)
ENDIF
//
// 1H
IF cond1H THEN
DRAWTEXT(” BULL “, -125, -25, SansSerif, Bold, 10) anchor(TopRight) coloured(“Green”)
ELSIF Not cond1H THEN
DRAWTEXT(” BEAR “, -125, -25, SansSerif, Bold, 10) anchor(TopRight) coloured(“Red”)
ENDIF
//
// 4H
IF cond4H THEN
DRAWTEXT(” BULL “, -80, -25, SansSerif, Bold, 10) anchor(TopRight) coloured(“Green”)
ELSIF Not cond4H THEN
DRAWTEXT(” BEAR “, -80, -25, SansSerif, Bold, 10) anchor(TopRight) coloured(“Red”)
ENDIF
//
// 1D
IF cond1D THEN
DRAWTEXT(” BULL “, -35, -25, SansSerif, Bold, 10) anchor(TopRight) coloured(“Green”)
ELSIF Not cond1D THEN
DRAWTEXT(” BEAR “, -35, -25, SansSerif, Bold, 10) anchor(TopRight) coloured(“Red”)
ENDIF
ENDIF
RETURN
This dashboard is a quick trend filter: for example, you can require multiple timeframes to show BULL before taking long setups, or treat mixed readings as a consolidation/range warning. Although the title mentions EMA, the provided implementation uses a 200-period SMA via Average[200]; you can add EMA logic separately if you want a dual-meter display.*
Interpretation tip: A common approach is to prioritize higher timeframes (4H, 1D) for directional bias, and use lower timeframes (5M, 15M) for timing entries in the same direction.
Check out this related content for more information:
https://www.prorealcode.com/topic/create-dashboard/#post-258075
Visit Link