Let’s hold issues easy first. We’ll pull:
- A 50-period EMA slope from a better timeframe (say, 1-hour).
- RSI momentum standing from the identical or one other timeframe.
Right here’s the essential construction:
//@model=6
indicator("Multi-Timeframe Dashboard", overlay=true)
// Person Settings
ema_tf = enter.timeframe("60", "EMA Timeframe")
rsi_tf = enter.timeframe("15", "RSI Timeframe")
ema_len = enter.int(50, "EMA Size")
rsi_len = enter.int(14, "RSI Size")
rsi_overbought = enter.int(70, "RSI Overbought Degree")
rsi_oversold = enter.int(30, "RSI Oversold Degree")// Fetch Greater Timeframe Knowledge
ema_htf = request.safety(syminfo.tickerid, ema_tf, ta.ema(shut, ema_len))
rsi_htf = request.safety(syminfo.tickerid, rsi_tf, ta.rsi(shut, rsi_len))// Easy Pattern Detection
ema_trend = ema_htf > ema_htf[1] ? "Uptrend" : "Downtrend"// Easy Momentum Detection
rsi_momentum = rsi_htf > rsi_overbought ? "Overbought" :
rsi_htf // Show Dashboard
var label dashboard = na
if (bar_index % 10 == 0) // Replace often
label.delete(dashboard)
dashboard := label.new(x=bar_index, y=excessive, textual content="Pattern: " + ema_trend + "nMomentum: " + rsi_momentum,
type=label.style_label_left, coloration=coloration.blue, textcolor=coloration.white, dimension=dimension.small)