OPEN-SOURCE SCRIPT

ETH/USDT Futures Helper (25x Leverage)

//version=5
indicator("ETH/USDT Futures Helper (25x Leverage)", overlay=true)

// Configuración de parámetros
length = input.int(14, title="Longitud para Soportes y Resistencias", minval=1)
rsi_length = input.int(14, title="Longitud del RSI")
ema_length = input.int(50, title="Longitud del EMA")

show_sr = input.bool(true, title="Mostrar Soportes y Resistencias")
show_rsi_filter = input.bool(true, title="Filtrar con RSI")
rsi_upper = input.int(70, title="RSI Sobrecomprado")
rsi_lower = input.int(30, title="RSI Sobrevendido")

// Cálculo de Soportes y Resistencias
highest_high = ta.highest(high, length)
lowest_low = ta.lowest(low, length)
resistance = highest_high
support = lowest_low

// RSI
rsi = ta.rsi(close, rsi_length)

// EMA
ema = ta.ema(close, ema_length)

// Condiciones de Señales con RSI y EMA
buy_condition = ta.crossover(close, support) and close > ema and (not show_rsi_filter or rsi < rsi_lower)
sell_condition = ta.crossunder(close, resistance) and close < ema and (not show_rsi_filter or rsi > rsi_upper)

// Mostrar Soportes y Resistencias
if show_sr
line.new(bar_index[length], resistance, bar_index[0], resistance, color=color.red, width=2, style=line.style_dotted, extend=extend.right)
line.new(bar_index[length], support, bar_index[0], support, color=color.green, width=2, style=line.style_dotted, extend=extend.right)

// Mostrar Señales en el Gráfico
plotshape(buy_condition, style=shape.labelup, location=location.belowbar, color=color.green, size=size.small, title="Buy Signal")
plotshape(sell_condition, style=shape.labeldown, location=location.abovebar, color=color.red, size=size.small, title="Sell Signal")

// Dibujar el EMA
plot(ema, color=color.blue, title="EMA")

// Alertas
alertcondition(buy_condition, title="Compra", message="¡Señal de compra detectada!")
alertcondition(sell_condition, title="Venta", message="¡Señal de venta detectada!")

// RSI Panel
hline(70, "RSI Overbought", color=color.red)
hline(30, "RSI Oversold", color=color.green)
plot(rsi, title="RSI", color=color.orange)
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