OPEN-SOURCE SCRIPT

RSI Long/Short Signals

178
// Estratégia de Sinais Long e Short baseada apenas no RSI
//version=6
indicator('RSI Long/Short Signals', overlay = true)

// Definição do RSI
rsi = ta.rsi(close, 14)

// Condições para LONG
long_condition = rsi < 25

// Condições para SHORT
short_condition = rsi > 75

// Plotando Sinais
plotshape(long_condition, location = location.belowbar, color = color.green, style = shape.labelup, title = 'LONG Signal')
plotshape(short_condition, location = location.abovebar, color = color.red, style = shape.labeldown, title = 'SHORT Signal')

// Alertas
if long_condition
alert('Sinal de LONG: RSI < 30 (Sobrevendido)', alert.freq_once_per_bar_close)
if short_condition
alert('Sinal de SHORT: RSI > 70 (Sobrecomprado)', alert.freq_once_per_bar_close)

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.