OPEN-SOURCE SCRIPT
FVG & OB Swing

Overview
A professional Smart Money Concepts (SMC) indicator that identifies high-probability trade setups by combining Fair Value Gaps (FVG), Order Blocks (OB), and Market Structure Analysis. Get precise BUY/SELL signals when institutional footprints align.
🎯 Signal Logic
🟢 BUY Signal
LL (Lower Low) forms → Bullish FVG created → ▲ BUY
SL: At the LL
🔴 SELL Signal
LH (Lower High) forms → Bearish FVG created → ▼ SELL
SL: At the LH
One signal per swing - No spam, only high-quality setups.
✨ Features
FeatureDescriptionFVG DetectionAuto-detects bullish/bearish imbalancesOrder BlocksSwing-based institutional zonesMarket StructureHH, HL, LH, LL swing labelsClean SignalsMinimal ▲/▼ or with R:R ratioPDH/PDL LevelsPrevious day high/lowClose-Only MitigationMore reliable zone invalidation4 Alert ConditionsBUY, SELL, Bull FVG, Bear FVG
📈 What's Displayed
Swing Labels: HH, HL, LH, LL at pivot points
FVG Zones: Cyan (bullish) / Red (bearish)
Order Blocks: Institutional supply/demand zones
Structure Lines: Dashed lines on swing breaks
PDH/PDL: Previous day levels
Info Panel: Current trend + LL/LH prices
Signals: Clean ▲ BUY / ▼ SELL markers
⚙️ Settings
Signals
Signal Style: Minimal (▲/▼), With R:R, or Full
R:R Ratio: For TP calculation display
SL Buffer: Extra buffer below swing
Visuals
Zone Transparency: 50-95%
Border Style: Solid/Dashed/Dotted/None
Max Zones: Limit displayed zones
Structure
Swing Length: Pivot detection sensitivity
Show/Hide: Swing labels, structure lines, PDH/PDL
🔔 Alerts
AlertTriggerBUY SignalLL + Bullish FVG createdSELL SignalLH + Bearish FVG createdBullish FVGNew bullish gap formedBearish FVGNew bearish gap formed
💡 How To Use
Add to chart - Works on any market/timeframe
Wait for structure - Let LL or LH form
Watch for FVG - Signal triggers on FVG creation
Entry: At signal candle close
Stop Loss: At the swing point (LL/LH)
Take Profit: Based on R:R ratio
Best Timeframes
Scalping: 5m, 15m
Intraday: 15m, 1H
Swing: 4H, Daily
🧠 Concepts
Smart Money Concepts (SMC)
ICT Methodology
Fair Value Gaps / Imbalances
Order Blocks / Supply & Demand
Market Structure (BOS/CHoCH)
Liquidity Sweeps
⚠️ Disclaimer
For educational purposes only. Past performance ≠ future results. Always use proper risk management.
A professional Smart Money Concepts (SMC) indicator that identifies high-probability trade setups by combining Fair Value Gaps (FVG), Order Blocks (OB), and Market Structure Analysis. Get precise BUY/SELL signals when institutional footprints align.
🎯 Signal Logic
🟢 BUY Signal
LL (Lower Low) forms → Bullish FVG created → ▲ BUY
SL: At the LL
🔴 SELL Signal
LH (Lower High) forms → Bearish FVG created → ▼ SELL
SL: At the LH
One signal per swing - No spam, only high-quality setups.
✨ Features
FeatureDescriptionFVG DetectionAuto-detects bullish/bearish imbalancesOrder BlocksSwing-based institutional zonesMarket StructureHH, HL, LH, LL swing labelsClean SignalsMinimal ▲/▼ or with R:R ratioPDH/PDL LevelsPrevious day high/lowClose-Only MitigationMore reliable zone invalidation4 Alert ConditionsBUY, SELL, Bull FVG, Bear FVG
📈 What's Displayed
Swing Labels: HH, HL, LH, LL at pivot points
FVG Zones: Cyan (bullish) / Red (bearish)
Order Blocks: Institutional supply/demand zones
Structure Lines: Dashed lines on swing breaks
PDH/PDL: Previous day levels
Info Panel: Current trend + LL/LH prices
Signals: Clean ▲ BUY / ▼ SELL markers
⚙️ Settings
Signals
Signal Style: Minimal (▲/▼), With R:R, or Full
R:R Ratio: For TP calculation display
SL Buffer: Extra buffer below swing
Visuals
Zone Transparency: 50-95%
Border Style: Solid/Dashed/Dotted/None
Max Zones: Limit displayed zones
Structure
Swing Length: Pivot detection sensitivity
Show/Hide: Swing labels, structure lines, PDH/PDL
🔔 Alerts
AlertTriggerBUY SignalLL + Bullish FVG createdSELL SignalLH + Bearish FVG createdBullish FVGNew bullish gap formedBearish FVGNew bearish gap formed
💡 How To Use
Add to chart - Works on any market/timeframe
Wait for structure - Let LL or LH form
Watch for FVG - Signal triggers on FVG creation
Entry: At signal candle close
Stop Loss: At the swing point (LL/LH)
Take Profit: Based on R:R ratio
Best Timeframes
Scalping: 5m, 15m
Intraday: 15m, 1H
Swing: 4H, Daily
🧠 Concepts
Smart Money Concepts (SMC)
ICT Methodology
Fair Value Gaps / Imbalances
Order Blocks / Supply & Demand
Market Structure (BOS/CHoCH)
Liquidity Sweeps
⚠️ Disclaimer
For educational purposes only. Past performance ≠ future results. Always use proper risk management.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.