Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=5
- indicator(title='Multi-Timeframe RSI', overlay=false)
- // RSI Inputs
- length = input(14, title='RSI Length')
- inp = input(close)
- // Calculate RSI on the hourly timeframe
- rsi_hourly = ta.rsi(inp, length)
- plot(rsi_hourly, color=color.new(color.blue, 0), title='RSI Hourly')
- // Calculate RSI on the 15-minute timeframe
- rsi_15min = request.security(syminfo.tickerid, '15', ta.rsi(close, length))
- plot(rsi_15min, color=color.new(color.red, 0), title='RSI 15-Minute')
- // Calculate RSI on the 5-minute timeframe
- rsi_5min = request.security(syminfo.tickerid, '5', ta.rsi(close, length))
- plot(rsi_5min, color=color.new(color.green, 0), title='RSI 5-Minute')
Advertisement
Add Comment
Please, Sign In to add comment