OPEN-SOURCE SCRIPT

Multi-Timeframe RSI

//version=5
indicator("Multi-Timeframe RSI", overlay=false)

// RSI Length
rsiLength = 14

// Central RSI (Current Timeframe)
centralRSI = ta.rsi(close, rsiLength)

// Higher Timeframe RSI Calculations
rsiMonthly = request.security(syminfo.ticker, "M", ta.rsi(close, rsiLength))
rsiWeekly = request.security(syminfo.ticker, "W", ta.rsi(close, rsiLength))
rsiDaily = request.security(syminfo.ticker, "D", ta.rsi(close, rsiLength))

// Plot RSI Values
plot(centralRSI, color=color.blue, linewidth=2, title="Central RSI")
plot(rsiMonthly, color=color.red, linewidth=2, title="Monthly RSI")
plot(rsiWeekly, color=color.green, linewidth=2, title="Weekly RSI")
plot(rsiDaily, color=color.orange, linewidth=2, title="Daily RSI")

// RSI Overbought & Oversold Levels
hline(70, "Overbought", color=color.gray)
hline(30, "Oversold", color=color.gray)
hline(50, "Midline", color=color.gray, linestyle=hline.style_dotted)

Clause de non-responsabilité