OPEN-SOURCE SCRIPT

Scalping EMA+RSI+BB carloss

//version=5
indicator("Scalping EMA+RSI+BB", overlay=true)

// Configuración de la EMA de 20 períodos
emaLength = 20
ema20 = ta.ema(close, emaLength)

// Cambiar color de la EMA según tendencia
emaColor = ema20 > ema20[1] ? color.green : color.red
plot(ema20, color=emaColor, linewidth=2, title="EMA 20")

// Configuración de las Bandas de Bollinger
bbLength = 20
bbMult = 2.0
basis = ta.sma(close, bbLength)
deviation = ta.stdev(close, bbLength)
upperBB = basis + bbMult * deviation
lowerBB = basis - bbMult * deviation
fill(plot(upperBB, color=color.blue, title="Banda Superior"),
plot(lowerBB, color=color.blue, title="Banda Inferior"), color=color.new(color.blue, 90))

// Configuración del RSI
rsiLength = 14
rsiOverbought = 70
rsiOversold = 30
rsi = ta.rsi(close, rsiLength)
hline(rsiOverbought, "Sobrecompra", color=color.red, linestyle=hline.style_dotted)
hline(rsiOversold, "Sobreventa", color=color.green, linestyle=hline.style_dotted)
hline(50, "Neutral", color=color.gray, linestyle=hline.style_dotted)

// Señales de compra y venta
buySignal = rsi < rsiOversold and close < lowerBB
sellSignal = rsi > rsiOverbought and close > upperBB

// Mostrar señales en el gráfico
plotshape(series=buySignal, title="Compra", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(series=sellSignal, title="Venta", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")

// Mensajes para la estrategia
alertcondition(buySignal, title="Alerta de Compra", message="Señal de compra detectada")
alertcondition(sellSignal, title="Alerta de Venta", message="Señal de venta detectada")
Chart patterns

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明