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()

  
Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.