Thursday, August 28, 2025

RSI Overbought and Oversold

RSI Overbought and Oversold

BTC.D+ETH.D CRYPTOCAP:BTC.D+CRYPTOCAP:ETH.D

//@version=5
indicator("RSI with Overbought/Oversold Shading", overlay=false)

// RSI settings
rsiLength = input.int(14, "RSI Length")
src = input(close, "Source")
rsi = ta.rsi(src, rsiLength)

// Overbought & oversold levels
overbought = input.int(70, "Overbought Level")
oversold = input.int(30, "Oversold Level")

// Plot RSI
plot(rsi, title="RSI", color=color.new(color.blue, 0), linewidth=2)
hline(overbought, "Overbought", color=color.red)
hline(oversold, "Oversold", color=color.green)
hline(50, "Midline", color=color.gray)

// Background shading
bgcolor(rsi > overbought ? color.new(color.red, 85) : na)
bgcolor(rsi < oversold ? color.new(color.green, 85) : na)



source https://www.tradingview.com/chart/BTC.D/t4CfmtNX-RSI-Overbought-and-Oversold/

No comments:

Post a Comment