PROTECTED SOURCE SCRIPT
Mis à jour

RSI With Trend Color

13 735
RSI > 50 = Bullish (rsi color green)
RSI < 50 = Bearish (rsi color red)
Notes de version
add yellow color to show overbought and oversold condition
Notes de version
//version=3
study(title="Relative Strength Index", shorttitle="RSI")
src = close, len = input(14, minval=1, title="Length")
up = rma(max(change(src), 0), len)
down = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
plotcolor1 = iff(rsi[1] > 50, lime, red)
plotcolor2 = iff((rsi[1] > 70 or rsi < 30), yellow, plotcolor1)
plot(rsi, linewidth=1, color=plotcolor1, transp=0)
plot(rsi, linewidth=1, color=plotcolor2, transp=0)
band1 = hline(70)
band0 = hline(50)
band2 = hline(30)
fill(band1, band0, color=green, transp=90)
fill(band0, band2, color=red, transp=90)

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.