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

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer