OPEN-SOURCE SCRIPT

REBOTE PRO EMA

114

//version=5
indicator(title="REBOTE PRO EMA", overlay=true)

// === CONFIGURACIÓN ===
emaRapida = input.int(20, "EMA Rápida")
emaLenta = input.int(50, "EMA Lenta (Tendencia)")
rsiPeriodo = input.int(14, "RSI Periodo")

// === CÁLCULOS ===
emaFast = ta.ema(close, emaRapida)
emaSlow = ta.ema(close, emaLenta)
rsiVal = ta.rsi(close, rsiPeriodo)

// === CONDICIONES DE TENDENCIA ===
tendenciaAlcista = emaFast > emaSlow
tendenciaBajista = emaFast < emaSlow

// === CONDICIONES DE REBOTE ===
reboteBuy = tendenciaAlcista and low <= emaFast and close > emaFast and rsiVal > 40
reboteSell = tendenciaBajista and high >= emaFast and close < emaFast and rsiVal < 60

// === GRÁFICOS ===
plot(emaFast, color=color.orange, linewidth=2)
plot(emaSlow, color=color.red, linewidth=2)

// === SEÑALES ===
plotshape(reboteBuy,
title="BUY",
style=shape.triangleup,
location=location.belowbar,
color=color.lime,
size=size.small)

plotshape(reboteSell,
title="SELL",
style=shape.triangledown,
location=location.abovebar,
color=color.red,
size=size.small)

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.