Script BinaryMT2


Este script detecta divergencias ocultas (hidden divergence) combinando ADX y RSI, y genera señales claras con triángulos grandes: verde para compra y rojo para venta.

Estrategia básica para operar (timeframe 1 minuto o 5 minutos recomendado):

  1. Espera las señales principales:
    • Triángulo verde grande abajo (“BUY” o “long”) → entra CALL (espera que suba el precio).
    • Triángulo rojo grande arriba (“SELL” o “short”) → entra PUT (espera que baje el precio).
  2. Condiciones ideales para mayor probabilidad:
    • Para CALL (triángulo verde): aparece cuando el precio hace un mínimo más alto (higher low), pero el RSI muestra un mínimo más bajo (divergencia oculta alcista) y el ADX está bajo (mercado sin tendencia fuerte).
    • Para PUT (triángulo rojo): aparece cuando el precio hace un máximo más bajo (lower high), pero el RSI muestra un máximo más alto (divergencia oculta bajista) y el ADX está bajo.
  3. Filtra las señales:
    • Opera solo cuando el ADX esté bajo (generalmente < 25), ya que las divergencias ocultas funcionan mejor en mercados en rango o en retrocesos.
    • Evita señales cuando el mercado está muy tendencial (ADX muy alto).
    • Preferiblemente combina con zonas de soporte/resistencia o toques de EMA para más confirmación.

Las divergencias ocultas son muy potentes en retrocesos, pero espera siempre la señal clara del triángulo. Prueba primero en demo, respeta la gestión de riesgo (máximo 1–2% por operación) y no operes todas las señales. Ningún indicador gana el 100% del tiempo.

instrument {
    name = 'BinaryMT2',
    icon = 'indicators:MA',
    overlay = true
}

input_group {
    "ADX",
    adx_color   = input { default = rgba(255, 255, 255, 0.7), type = input.color },
    adx_width   = input { default = 1, type = input.line_width },
    adx_visible = input { default = true, type = input.plot_visibility }
}

-- CÁLCULOS RSI
Rlength = 14
change1 = change(close)
gain    = iff(change1 >= 0, change1, 0.0)
loss    = iff(change1 < 0, (-1) * change1, 0.0)
avgGain = rma(gain, Rlength)
avgLoss = rma(loss, Rlength)
rs      = avgGain / avgLoss
rsi     = 100 - (100 / (1 + rs))

-- CÁLCULOS ADX
len    = 14
lensig = 14

up      = change(high)
down    = -change(low)
plusDM  = iff(na(up), na, iff(up > down and up > 0, up, 0))
minusDM = iff(na(down), na, iff(down > up and down > 0, down, 0))
trur    = rma(tr, len)
plus    = fixnan(100 * rma(plusDM, len) / trur)
minus   = fixnan(100 * rma(minusDM, len) / trur)
sum     = plus + minus

adx = 100 * rma(abs(plus - minus) / (plus + minus), lensig)

-- DETECCIÓN DE PICOS Y VALLES (TOP / BOTTOM)
top = (plus < plus[1] and plus[1] > plus[2] and minus > minus[1]) 
      or (plus < plus[1] and minus > minus[1] and minus[1] < minus[2])

bottom = (minus < minus[1] and minus[1] > minus[2] and plus > plus[1]) 
         or (minus < minus[1] and plus > plus[1] and plus[1] < plus[2])

-- CONDICIONES DE DIVERGENCIA
hiddenbeardiv = top and high < high[1] and rsi > rsi[1] and adx < 25
hiddenbulldiv = bottom and low > low[1] and rsi < rsi[1] and adx < 25

-- PLOTEO DE SEÑALES
plot_shape(hiddenbeardiv, "short", shape_style.triangledown, shape_size.large, 'red',   shape_location.abovebar, 0, 'SELL', 'red')
plot_shape(hiddenbulldiv, "long",  shape_style.triangleup,   shape_size.large, 'green', shape_location.belowbar, 0, 'BUY',  'green')

Software Bypass
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

Share to...