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.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。