PROTECTED SOURCE SCRIPT
RSI Levels on Candle Chart (40/50/60)

//version=5
indicator("RSI Levels on Candle Chart (40/50/60)", overlay=true)
// === RSI Calculation ===
rsi = ta.rsi(close, 21)
// === Define RSI Levels to Draw ===
rsi_40 = 40
rsi_50 = 50
rsi_60 = 60
// === Define RSI min/max range for scaling to price
rsi_min = 30
rsi_max = 70
// === Get visible price range for mapping
price_min = ta.lowest(low, 100)
price_max = ta.highest(high, 100)
// === Function to map RSI to price chart Y-axis
rsiToPrice(rsiLevel) =>
price_min + (rsiLevel - rsi_min) / (rsi_max - rsi_min) * (price_max - price_min)
// === Map RSI levels to price scale
price_rsi_40 = rsiToPrice(rsi_40)
price_rsi_50 = rsiToPrice(rsi_50)
price_rsi_60 = rsiToPrice(rsi_60)
// === Plot horizontal lines at RSI levels
plot(price_rsi_40, title="RSI 40 (Red)", color=color.red, linewidth=2)
plot(price_rsi_50, title="RSI 50 (Blue)", color=color.blue, linewidth=2)
plot(price_rsi_60, title="RSI 60 (Green)", color=color.green, linewidth=2)
indicator("RSI Levels on Candle Chart (40/50/60)", overlay=true)
// === RSI Calculation ===
rsi = ta.rsi(close, 21)
// === Define RSI Levels to Draw ===
rsi_40 = 40
rsi_50 = 50
rsi_60 = 60
// === Define RSI min/max range for scaling to price
rsi_min = 30
rsi_max = 70
// === Get visible price range for mapping
price_min = ta.lowest(low, 100)
price_max = ta.highest(high, 100)
// === Function to map RSI to price chart Y-axis
rsiToPrice(rsiLevel) =>
price_min + (rsiLevel - rsi_min) / (rsi_max - rsi_min) * (price_max - price_min)
// === Map RSI levels to price scale
price_rsi_40 = rsiToPrice(rsi_40)
price_rsi_50 = rsiToPrice(rsi_50)
price_rsi_60 = rsiToPrice(rsi_60)
// === Plot horizontal lines at RSI levels
plot(price_rsi_40, title="RSI 40 (Red)", color=color.red, linewidth=2)
plot(price_rsi_50, title="RSI 50 (Blue)", color=color.blue, linewidth=2)
plot(price_rsi_60, title="RSI 60 (Green)", color=color.green, linewidth=2)
Korumalı komut dosyası
Bu komut dosyası kapalı kaynak olarak yayınlanmaktadır. Ancak, özgürce ve herhangi bir sınırlama olmaksızın kullanabilirsiniz – daha fazla bilgi burada.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Korumalı komut dosyası
Bu komut dosyası kapalı kaynak olarak yayınlanmaktadır. Ancak, özgürce ve herhangi bir sınırlama olmaksızın kullanabilirsiniz – daha fazla bilgi burada.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.