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.
Skrip open-source
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Pernyataan Penyangkalan
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Skrip open-source
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Pernyataan Penyangkalan
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.