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

開源腳本

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

想在圖表上使用此腳本?

免責聲明