OPEN-SOURCE SCRIPT
OB & FVG Indicator

Clean and simple visualization of Order Blocks (OB) and Fair Value Gaps (FVG) with automatic detection and customizable display settings. Perfect for Smart Money Concepts (SMC) traders.
FULL DESCRIPTION
📊 OVERVIEW
This indicator automatically detects and displays two key Smart Money Concepts (SMC) elements on your chart:
Order Blocks (OB) - Institutional supply and demand zones
Fair Value Gaps (FVG) - Price imbalances that often get revisited
Designed for clarity and simplicity, this tool helps traders identify high-probability reversal zones and potential entry points based on institutional trading behavior.
🔧 KEY FEATURES
Order Blocks Detection:
Automatically identifies bullish OB (last bearish candle before upward move)
Automatically identifies bearish OB (last bullish candle before downward move)
Customizable colors for bullish/bearish zones
Optional labels for easy identification
Minimum size filter to eliminate noise
Fair Value Gaps Detection:
Detects bullish FVG (gap between candle high and previous candle low)
Detects bearish FVG (gap between candle low and previous candle high)
Color-coded zones for instant recognition
Auto-deletion of filled gaps (optional)
Minimum size filter in pips
Visual Customization:
Adjustable transparency levels
Custom color schemes for all elements
Configurable box extension length
Toggle labels on/off
Clean, non-cluttered chart display
Performance Optimization:
Automatic deletion of old boxes to maintain chart performance
Maximum 100 boxes stored at once
Lightweight code for fast rendering
⚙️ HOW TO USE
1. Installation
Click "Add to Chart"
The indicator will appear on your chart overlay
2. Configuration
Open Settings panel (gear icon)
Customize colors, transparency, and filters under respective groups
Adjust minimum size filters to match your trading style and timeframe
3. Interpretation
Order Blocks:
Blue zones = Bullish OB (potential support/demand)
Orange zones = Bearish OB (potential resistance/supply)
Price often reacts strongly when revisiting these zones
Fair Value Gaps:
Green zones = Bullish FVG (potential retracement target in uptrends)
Red zones = Bearish FVG (potential retracement target in downtrends)
Gaps are often "filled" before continuation moves
📈 BEST PRACTICES
Timeframe Recommendations:
15m - 1H charts: Best for intraday trading
4H - Daily charts: Best for swing trading
Higher timeframes produce more reliable zones
Filter Settings:
Lower timeframes: Increase minimum size filters to reduce noise
Higher timeframes: Can use smaller minimum size settings
Adjust based on asset volatility (crypto vs. forex vs. stocks)
⚠️ IMPORTANT NOTES
This indicator identifies potential zones but does not guarantee reversals
Always use proper risk management and stop losses
Combine with price action analysis for best results
Not all OBs/FVGs will result in reactions
Past performance does not guarantee future results
📝 SETTINGS OVERVIEW
FVG Settings:
Enable/disable FVG display
Bullish and bearish color selection
Extension length (bars)
Auto-delete filled gaps option
Minimum gap size filter (pips)
OB Settings:
Enable/disable OB display
Bullish and bearish color selection
Extension length (bars)
Show/hide labels
Minimum block size filter (pips)
✨ Clean, Simple, Effective
No complicated signals or cluttered displays - just clear visualization of the institutional footprints that matter most.
FULL DESCRIPTION
📊 OVERVIEW
This indicator automatically detects and displays two key Smart Money Concepts (SMC) elements on your chart:
Order Blocks (OB) - Institutional supply and demand zones
Fair Value Gaps (FVG) - Price imbalances that often get revisited
Designed for clarity and simplicity, this tool helps traders identify high-probability reversal zones and potential entry points based on institutional trading behavior.
🔧 KEY FEATURES
Order Blocks Detection:
Automatically identifies bullish OB (last bearish candle before upward move)
Automatically identifies bearish OB (last bullish candle before downward move)
Customizable colors for bullish/bearish zones
Optional labels for easy identification
Minimum size filter to eliminate noise
Fair Value Gaps Detection:
Detects bullish FVG (gap between candle high and previous candle low)
Detects bearish FVG (gap between candle low and previous candle high)
Color-coded zones for instant recognition
Auto-deletion of filled gaps (optional)
Minimum size filter in pips
Visual Customization:
Adjustable transparency levels
Custom color schemes for all elements
Configurable box extension length
Toggle labels on/off
Clean, non-cluttered chart display
Performance Optimization:
Automatic deletion of old boxes to maintain chart performance
Maximum 100 boxes stored at once
Lightweight code for fast rendering
⚙️ HOW TO USE
1. Installation
Click "Add to Chart"
The indicator will appear on your chart overlay
2. Configuration
Open Settings panel (gear icon)
Customize colors, transparency, and filters under respective groups
Adjust minimum size filters to match your trading style and timeframe
3. Interpretation
Order Blocks:
Blue zones = Bullish OB (potential support/demand)
Orange zones = Bearish OB (potential resistance/supply)
Price often reacts strongly when revisiting these zones
Fair Value Gaps:
Green zones = Bullish FVG (potential retracement target in uptrends)
Red zones = Bearish FVG (potential retracement target in downtrends)
Gaps are often "filled" before continuation moves
📈 BEST PRACTICES
Timeframe Recommendations:
15m - 1H charts: Best for intraday trading
4H - Daily charts: Best for swing trading
Higher timeframes produce more reliable zones
Filter Settings:
Lower timeframes: Increase minimum size filters to reduce noise
Higher timeframes: Can use smaller minimum size settings
Adjust based on asset volatility (crypto vs. forex vs. stocks)
⚠️ IMPORTANT NOTES
This indicator identifies potential zones but does not guarantee reversals
Always use proper risk management and stop losses
Combine with price action analysis for best results
Not all OBs/FVGs will result in reactions
Past performance does not guarantee future results
📝 SETTINGS OVERVIEW
FVG Settings:
Enable/disable FVG display
Bullish and bearish color selection
Extension length (bars)
Auto-delete filled gaps option
Minimum gap size filter (pips)
OB Settings:
Enable/disable OB display
Bullish and bearish color selection
Extension length (bars)
Show/hide labels
Minimum block size filter (pips)
✨ Clean, Simple, Effective
No complicated signals or cluttered displays - just clear visualization of the institutional footprints that matter most.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.