rober98303

Trading automatizado airob

BINANCE:WAVESUSDT   Waves / TetherUS
 //@version=4
strategy("Estrategia de Trading Automatizada", overlay=true)

// Definir los parámetros de los indicadores
length = input(14, minval=1, title="Longitud")
mult = input(2.0, minval=0.1, maxval=5, title="Multiplicador")

// Calcular el Squeeze Momentum
[squeeze, momentum] = squeeze_momentum(length, mult)

// Calcular el RSI
rsi_length = input(14, minval=1, title="Longitud RSI")
rsi = rsi(close, rsi_length)

// Calcular el ADX
adx_length = input(14, minval=1, title="Longitud ADX")
adx = adx(high, low, close, adx_length)

// Calcular el Volume Profile
volume_profile_length = input(14, minval=1, title="Longitud Volume Profile")
volume_profile = volumeProfile(close, volume_profile_length)

// Lógica de la Estrategia
if squeeze and momentum > 0 and rsi > 70 and adx > 25 and volume_profile > 0
    strategy.entry("Buy", strategy.long)
    strategy.exit("Sell", "Buy", stop=close * 0.98)

// Manejo de Errores y Excepciones
if na(squeeze) or na(momentum) or na(rsi) or na(adx) or na(volume_profile)
    strategy.close_all()
    strategy.cancel_all()

  
Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.