PROTECTED SOURCE SCRIPT

MTF Order Block & FVG Finder (Public Ver.)

434
═══════════════════════════════════════════════════════════════
🎯 OVERVIEW
═══════════════════════════════════════════════════════════════

The MTF Order Block & FVG Finder is a comprehensive institutional trading tool that identifies and visualizes Order Blocks (OB) and Fair Value Gaps (FVG) across multiple timeframes. This indicator helps traders spot key support and resistance zones where institutional players have placed significant orders.


═══════════════════════════════════════════════════════════════
✨ KEY FEATURES
═══════════════════════════════════════════════════════════════

📊 ORDER BLOCK DETECTION
• Multi-Timeframe Analysis: Monitor up to 3 different timeframes simultaneously
• Smart Engulfing Detection: Identifies bullish and bearish order blocks using engulfing patterns
• ATR-Based Filtering: Filter out insignificant order blocks using customizable ATR multiplier
• Dynamic Extension: Option to extend order blocks to the right edge of the chart
• Visual Differentiation: Distinct colors and transparency levels for each timeframe
• Auto-Invalidation: Order blocks automatically disappear when price closes beyond them

🔲 FAIR VALUE GAP (FVG) DETECTION
• 12 Timeframe Support: From 1-minute to weekly charts (1, 3, 5, 15, 30, 45, 60, 120, 180, 240, D, W)
• Dynamic Level Adjustment: FVG levels automatically update when price touches the gap
• Color Change System: Visual indication when FVG zones are tested by price
• Customizable Display: Full control over extension, labels, colors, and sizes
• Smart Management: FVGs are removed when fully filled by price action

🔔 ADVANCED ALERT SYSTEM
• Price Touch Alerts: Get notified when price reaches order block zones
• Separate Controls: Enable/disable alerts for bullish and bearish order blocks independently
• Tolerance Settings: Adjust alert sensitivity with percentage-based tolerance (0-1%)
• Detailed Messages: Alerts include current price, block range, and timeframe information
• Smart Triggering: Prevents duplicate alerts on the same bar


═══════════════════════════════════════════════════════════════
⚙️ SETTINGS GUIDE
═══════════════════════════════════════════════════════════════

🎨 ORDER BLOCK SETTINGS
• Primary Timeframe: Main timeframe for order block detection (default: current chart)
• Secondary Timeframe: Optional second timeframe with toggle on/off
• Tertiary Timeframe: Optional third timeframe with toggle on/off
• Extend to Right: Automatically extend order blocks to current price bar
• Filter Small Blocks: Enable ATR-based filtering to focus on significant levels
• ATR Period: Lookback period for ATR calculation (default: 100)
• Minimum OB Size: Threshold as multiple of ATR (default: 0.3× ATR)

📐 FVG SETTINGS
• Move Levels on Touch: Dynamically adjust FVG boundaries when price interacts
• Change Color on Touch: Visual feedback showing tested vs untested FVGs
• Extend to Right: Extend FVG boxes to current price bar
• Plot Labels: Display timeframe labels on FVG boxes
• Custom Colors: Separate colors for bullish, bearish, and tested FVGs
• Timeframe Selection: Choose which timeframes to display FVGs

🔔 ALERT SETTINGS
• Enable Price Touch Alerts: Master switch for all alerts
• Bullish OB Alerts: Notifications when price touches bullish order blocks
• Bearish OB Alerts: Notifications when price touches bearish order blocks
• Alert Tolerance: Fine-tune sensitivity (default: 0.1%)


═══════════════════════════════════════════════════════════════
🔍 HOW IT WORKS
═══════════════════════════════════════════════════════════════

📌 ORDER BLOCK LOGIC
An order block forms when a strong directional candle engulfs the previous candle:

BULLISH ORDER BLOCK:
✓ Current candle closes above its open (bullish candle)
✓ Previous candle closed below its open (bearish candle)
✓ Current candle's close is above previous candle's open
✓ Current candle's open is below previous candle's close
→ The previous bearish candle's body becomes the bullish order block

BEARISH ORDER BLOCK:
✓ Current candle closes below its open (bearish candle)
✓ Previous candle closed above its open (bullish candle)
✓ Current candle's close is below previous candle's open
✓ Current candle's open is above previous candle's close
→ The previous bullish candle's body becomes the bearish order block

INVALIDATION:
• Bullish OB: Invalidated when price closes below the block's low
• Bearish OB: Invalidated when price closes above the block's high

📌 FAIR VALUE GAP LOGIC
FVGs represent areas where price moved rapidly with minimal trading activity:

BULLISH FVG (Gap Up):
• Low of current candle > High of candle [2]
• Creates unfilled space between these two candles
• Acts as potential support zone

BEARISH FVG (Gap Down):
• High of current candle < Low of candle [2]
• Creates unfilled space between these two candles
• Acts as potential resistance zone

FVG MANAGEMENT:
• Gaps are "filled" when price fully retraces through them
• Optional: Adjust levels when partially filled
• Optional: Change color to show tested zones


═══════════════════════════════════════════════════════════════
💡 TRADING APPLICATIONS
═══════════════════════════════════════════════════════════════

📈 ENTRY STRATEGIES
• Use order blocks as high-probability entry zones
• Wait for price to return to OB/FVG before entering
• Combine with higher timeframe trend direction
• Look for confluence between OBs and FVGs

🛡️ RISK MANAGEMENT
• Place stop losses beyond order block boundaries
• Use multiple timeframe OBs for layered stop placement
• Smaller OBs (filtered by ATR) = tighter stops
• Larger OBs = more significant levels

🎯 TARGET SETTING
• Next order block or FVG as initial target
• Multiple timeframe analysis for swing targets
• Use FVG fills as profit-taking zones
• Higher timeframe OBs as major targets

✅ CONFIRMATION TECHNIQUES
• Wait for price reaction at order block levels
• Look for reversal candlestick patterns
• Combine with volume analysis
• Use lower timeframe for precise entries


═══════════════════════════════════════════════════════════════
🎓 BEST PRACTICES
═══════════════════════════════════════════════════════════════

1️⃣ START WITH HIGHER TIMEFRAMES
• Focus on 4H, Daily, or Weekly order blocks first
• These represent stronger institutional levels
• Use lower timeframes for entry refinement

2️⃣ USE ATR FILTER WISELY
• Enable filtering to reduce noise
• Adjust multiplier based on market volatility
• Higher volatility = higher multiplier needed

3️⃣ COMBINE MULTIPLE TIMEFRAMES
• Look for confluence zones (multiple OBs/FVGs aligning)
• Higher timeframe OB + lower timeframe FVG = strong zone
• Three timeframe alignment = highest probability setups

4️⃣ ALERT MANAGEMENT
• Enable alerts for hands-free monitoring
• Set appropriate tolerance based on asset volatility
• Crypto: 0.1-0.3% | Forex: 0.05-0.1% | Stocks: 0.1-0.2%

5️⃣ UNDERSTAND MARKET CONTEXT
• OBs work best in trending markets
• FVGs are powerful in range-bound conditions
• Always consider overall market structure


═══════════════════════════════════════════════════════════════
📊 TECHNICAL SPECIFICATIONS
═══════════════════════════════════════════════════════════════

• Pine Script™ Version: 6
• Indicator Type: Overlay
• Maximum Boxes: 500
• Maximum Labels: 500
• Dynamic Requests: Enabled
• License: Mozilla Public License 2.0


═══════════════════════════════════════════════════════════════
🎨 VISUAL CUSTOMIZATION
═══════════════════════════════════════════════════════════════

COLOR CODING:
• Primary TF: Darker/More opaque (70% transparency)
• Secondary TF: Medium opacity (80% transparency)
• Tertiary TF: Lighter/More transparent (90% transparency)
• Green: Bullish order blocks
• Red: Bearish order blocks
• Gray: Tested FVGs

LABEL SYSTEM:
• Timeframe labels clearly identify each OB/FVG
• Centered placement for easy identification
• Customizable label size and color
• Optional hide/show functionality


═══════════════════════════════════════════════════════════════
⚠️ IMPORTANT NOTES
═══════════════════════════════════════════════════════════════

• This indicator is for educational purposes only
• Not financial advice - always do your own research
• Past performance does not guarantee future results
• Practice proper risk management in all trades
• Combine with other analysis tools for best results
• Test settings on your preferred assets and timeframes

Disclaimer

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.