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 open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.