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
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.