Este script SMC_BOS_FVG_OB_Pinbar_Sessions_Alerts, es un modelo institucional diseñado para identificar zonas de alta probabilidad basadas en estructura, liquidez y confirmación de intención. Su objetivo es estandarizar la lectura del mercado y ejecutar únicamente cuando se cumplen condiciones institucionales verificables.
A continuación, el manual que documenta la metodología, reglas operativas y ejemplos visuales para su aplicación profesional.

🎯 Objetivo
Este enfoque se fundamenta en:
- Identificar dónde el mercado toma liquidez.
- Esperar una ruptura estructural real (BOS).
- Confirmar intención mediante pinbar institucional.
- Ejecutar únicamente en mitigación institucional (FVG u OB).
- Validar con la siguiente vela.
- Filtrar por RR mínimo y sesión operativa.
Este proceso tiene el objetivo de eliminar ruido, reducir entradas falsas y alinear la ejecución con el comportamiento de mesas institucionales.
⚙️ Configuración Inicial
| Parámetro | Descripción | Recomendación |
| Left / Right bars | Sensibilidad de pivotes | 2–3 para intradía |
| RR mínimo | Ratio mínima para alertar entrada | 1.5 o superior |
| Sesión | Filtro horario | Asia / Londres / NY según tu operativa |
| Dibujar zona | Visualización de FVG/OB | Activado para backtest, desactivado para ejecución |
| Alertas | Activar/desactivar eventos | Mantén activadas las de entrada y toque |
🔍 Jerarquía de Confirmación
- Liquidity Taken → se limpia un extremo previo.
- Break of Structure (BOS) → ruptura real del último swing.
- Pinbar → rechazo fuerte institucional.
- Zona más cercana (FVG u OB) → punto de mitigación.
- Toque real de zona → precio entra en la zona.
- Confirmación de la siguiente vela → dirección validada.
- RR ≥ X y sesión válida → entrada activada.
🧩 Alertas Institucionales
El sistema genera alertas para:
- BOS
- Pinbar
- Toque
- Entrada
Cada alerta incluye:
- Dirección (LONG/SHORT)
- Entry
- SL
- TP
- RR
- Sesión
Esto permite operar sin estar pegado al gráfico.
| Tipo | Descripción | Mensaje | |||||
| BOS | Ruptura estructural | “BOS ALCISTA/BAJISTA detectado” | |||||
| Pinbar | Rechazo fuerte | “Pinbar ALCISTA/BAJISTA detectado” | |||||
| Toque | Mitigación real | “TOQUE de zona (LONG/SHORT)” | |||||
| Entrada | Confirmación completa | “ENTRY LONG/SHORT ACTIVADA | Entry: X | SL: Y | TP: Z | RR: n | Sesión: NY” |
🧠 Interpretación Visual
- Líneas amarillas: FVG (rango de desequilibrio).
- Líneas naranjas: OB (última vela institucional).
- Líneas rojas / verdes: SL y TP.
- Línea amarilla continua: punto de entrada.
🧩 Reglas de Ejecución
- No se anticipan entradas.
- No se opera sin BOS.
- No se opera sin pinbar.
- No se opera sin toque real.
- No se opera sin confirmación de la siguiente vela.
- No se opera si RR < mínimo.
- No se opera fuera de sesión.
- SL siempre en el swing que generó la liquidez.
- TP automático a 2R.
🧮 Optimización sugerida
| Sesión | Características | Recomendación |
| Asia | Rango y acumulación | Preparar liquidez |
| Londres | Expansión | Mayor frecuencia de BOS |
| NY | Manipulación | Mejor confirmación |
Conclusiones
El sistema SMC Sniper permite ejecutar con precisión institucional, eliminando ruido y estandarizando la lectura del mercado. Su fortaleza radica en la secuencia lógica y la disciplina operativa.
Script para Pine
//@version=5indicator("SMC_BOS_FVG_OB_Pinbar_Sessions_Alerts", overlay = true, max_labels_count = 500, max_lines_count = 500)//---------------------------------------------------------// INPUTS//---------------------------------------------------------left = input.int(2, "Left bars")right = input.int(2, "Right bars")showZone = input.bool(true, "Dibujar zona elegida (FVG u OB)")// AlertasalertBOS = input.bool(true, "Alerta: BOS detectado")alertPinbar = input.bool(true, "Alerta: Pinbar detectado")alertTouch = input.bool(true, "Alerta: Toque de zona")alertEntry = input.bool(true, "Alerta: Entrada confirmada")// Filtro de RR mínimo (ratio)minRR = input.float(1.5, "RR minimo para alertar entrada", step = 0.1)// Filtro de sesiónsessionChoice = input.string("Londres", "Sesion para alertar entrada", options = ["Asia", "Londres", "Nueva York"])//---------------------------------------------------------// SESIONES (ajusta horarios a tu broker si hace falta)//---------------------------------------------------------asiaSession = time(timeframe.period, "1800-0000")londonSession = time(timeframe.period, "0200-0500")newYorkSession = time(timeframe.period, "0700-1100")inAsia = not na(asiaSession)inLondon = not na(londonSession)inNewYork = not na(newYorkSession)sessionOK = (sessionChoice == "Asia" and inAsia) or (sessionChoice == "Londres" and inLondon) or (sessionChoice == "Nueva York" and inNewYork)//---------------------------------------------------------// 1. Swings (estructura + liquidez)//---------------------------------------------------------swingHigh = ta.pivothigh(high, left, right)swingLow = ta.pivotlow(low, left, right)var float lastHigh = navar float lastLow = naif not na(swingHigh) lastHigh := swingHighif not na(swingLow) lastLow := swingLow//---------------------------------------------------------// 2. Liquidity Taken//---------------------------------------------------------liqBuy = not na(lastHigh) and high > lastHighliqSell = not na(lastLow) and low < lastLow//---------------------------------------------------------// 3. BOS//---------------------------------------------------------bosBull = liqBuy and close > lastHighbosBear = liqSell and close < lastLow//---------------------------------------------------------// 4. FVG//---------------------------------------------------------bullFVG = low[1] > high[2]bearFVG = high[1] < low[2]var float fvgTop = navar float fvgBot = naif bullFVG fvgTop := low[1] fvgBot := high[2]if bearFVG fvgTop := high[2] fvgBot := low[1]//---------------------------------------------------------// 5. OB (Order Block)//---------------------------------------------------------var float obHigh = navar float obLow = naif bosBull obHigh := high[1] obLow := low[1]if bosBear obHigh := high[1] obLow := low[1]//---------------------------------------------------------// 6. Pinbar Confirmation//---------------------------------------------------------body = math.abs(close - open)upperWick = high - math.max(close, open)lowerWick = math.min(close, open) - lowpinbarBull = lowerWick >= body * 2 and close > openpinbarBear = upperWick >= body * 2 and close < open//---------------------------------------------------------// 7. ELECCION AUTOMATICA: FVG u OB (la mas cercana)//---------------------------------------------------------var float zone = navar bool isFVG = false// LONGif bosBull and pinbarBull and not na(fvgBot) and not na(obHigh) distFVG = math.abs(close - fvgBot) distOB = math.abs(close - obHigh) if distFVG < distOB zone := fvgBot isFVG := true else zone := obHigh isFVG := false// SHORTif bosBear and pinbarBear and not na(fvgTop) and not na(obLow) distFVG = math.abs(close - fvgTop) distOB = math.abs(close - obLow) if distFVG < distOB zone := fvgTop isFVG := true else zone := obLow isFVG := false//---------------------------------------------------------// 8. TOQUE DE ZONA//---------------------------------------------------------touch = not na(zone) and low <= zone and high >= zone//---------------------------------------------------------// 9. CONFIRMACION DE LA SIGUIENTE VELA//---------------------------------------------------------bullNextConfirm = touch[1] and close > open and close > (low + (high - low) * 0.5)bearNextConfirm = touch[1] and close < open and close < (high - (high - low) * 0.5)//---------------------------------------------------------// 10. ENTRADA FINAL + RR (ratio)//---------------------------------------------------------var float entry = navar float sl = navar float tp = navar float rrRatio = na// LONGif bullNextConfirm entry := zone[1] sl := lastLow tp := entry + (entry - sl) * 2.0 risk = math.abs(entry - sl) reward = math.abs(tp - entry) rrRatio := risk > 0 ? reward / risk : na// SHORTif bearNextConfirm entry := zone[1] sl := lastHigh tp := entry - (sl - entry) * 2.0 risk = math.abs(sl - entry) reward = math.abs(entry - tp) rrRatio := risk > 0 ? reward / risk : na//---------------------------------------------------------// 11. DIBUJAR ZONA ELEGIDA//---------------------------------------------------------if showZone and not na(zone) if isFVG line.new(bar_index, fvgTop, bar_index - 1, fvgTop, extend = extend.right, color = color.new(color.yellow, 70)) line.new(bar_index, fvgBot, bar_index - 1, fvgBot, extend = extend.right, color = color.new(color.yellow, 70)) else line.new(bar_index, zone, bar_index - 1, zone, extend = extend.right, color = color.new(color.orange, 70))//---------------------------------------------------------// 12. PLOTS//---------------------------------------------------------plot(entry, "Entry", color = color.new(color.yellow, 0), style = plot.style_linebr)plot(sl, "SL", color = color.new(color.red, 0), style = plot.style_linebr)plot(tp, "TP", color = color.new(color.green, 0), style = plot.style_linebr)//---------------------------------------------------------// 13. ALERTAS INSTITUCIONALES (simplificadas)//---------------------------------------------------------// BOSif alertBOS and bosBull alert("BOS ALCISTA detectado (LONG)", alert.freq_once_per_bar)if alertBOS and bosBear alert("BOS BAJISTA detectado (SHORT)", alert.freq_once_per_bar)// PINBARif alertPinbar and pinbarBull alert("Pinbar ALCISTA detectado", alert.freq_once_per_bar)if alertPinbar and pinbarBear alert("Pinbar BAJISTA detectado", alert.freq_once_per_bar)// TOQUEif alertTouch and touch dir = bosBull ? "LONG" : bosBear ? "SHORT" : "NA" alert("TOQUE de zona (" + dir + ")", alert.freq_once_per_bar)// ENTRADA FINAL (con filtros RR + sesion)entryLong = bullNextConfirm and not na(rrRatio) and rrRatio >= minRR and sessionOKentryShort = bearNextConfirm and not na(rrRatio) and rrRatio >= minRR and sessionOKif alertEntry and entryLong msgLong = "ENTRY LONG | Entry: " + str.tostring(entry, format.mintick) + " | SL: " + str.tostring(sl, format.mintick) + " | TP: " + str.tostring(tp, format.mintick) + " | RR: " + str.tostring(rrRatio, format.mintick) + " | Sesion: " + sessionChoice alert(msgLong, alert.freq_once_per_bar)if alertEntry and entryShort msgShort = "ENTRY SHORT | Entry: " + str.tostring(entry, format.mintick) + " | SL: " + str.tostring(sl, format.mintick) + " | TP: " + str.tostring(tp, format.mintick) + " | RR: " + str.tostring(rrRatio, format.mintick) + " | Sesion: " + sessionChoice alert(msgShort, alert.freq_once_per_bar)
Ejemplo visual

En esta imagen vemos la entrada un poco mas arriba de la línea amarilla (por el lag de tiempo del trader), luego del ticker Alcista, triangulo verde a las 820 del 20262005 (este viene del script publicado antes de esta publicación: https://alextorres.consulting/2026/05/15/como-leer-el-mercado-integracion-del-panel-multitimeframe/), nos indica un TP que se cumple una hora después (20260520 0915) y sin tocar SL (línea roja en el gráfico), en un momento volátil del XAUUSD ese 20 de mayo del 2026 que se esperaba las FOMC Meeting Minutes a las 12 pm:
