OPEN-SOURCE SCRIPT

ICT Order Block Identifier [Eˣ]

176
Pine Script®
📦 Order Block Identifier - Free Indicator Overview The Order Block Identifier automatically detects and displays institutional order blocks on your charts - the exact zones where banks, hedge funds, and market makers place their orders. Based on ICT (Inner Circle Trader) concepts, this indicator helps you trade alongside smart money by identifying where institutions are likely to defend their positions and where price often finds support or resistance. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🎯 What This Indicator Does Detects Order Blocks: • 🟢 [color=green]Bullish Order Blocks (OB+)[/color] - Last bearish candle before strong bullish move • 🔴 [color=red]Bearish Order Blocks (OB-)[/color] - Last bullish candle before strong bearish move • Automatically identifies institutional buying/selling zones • Tracks up to 30 order blocks simultaneously • Works on all timeframes and instruments Smart Features: • Auto-Timeframe Adjustment - Optimizes detection for 1min to Weekly charts • Active Block Highlighting - Shows which OB price is approaching (🎯) • Mitigation Tracking - Knows when blocks are "used" and no longer valid • ATR-Based Detection - Adapts to each instrument's volatility • Strength Filtering - Choose Low/Medium/High to control sensitivity Visual Display: • Clean boxes extending from order block to current price • Color-coded: Green (bullish), Red (bearish), Gray (mitigated) • OB+ / OB- labels for quick identification • Active blocks highlighted with 🎯 emoji • Distance indicator showing how far price is from nearest OB Statistics Panel: • Count of active bullish and bearish order blocks • Market bias based on OB balance • Distance to nearest order block • Real-time status updates ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📚 Understanding Order Blocks What Are Order Blocks? Order blocks are the "footprints" left behind by institutional traders (banks, hedge funds, market makers) when they enter large positions. Because institutions can't fill massive orders at once without moving the market, they: 1. Place orders gradually over time 2. Leave zones where their buy/sell orders are concentrated 3. Defend these zones when price returns 4. Create reliable support and resistance levels The ICT Concept: Developed by Michael Huddleston (Inner Circle Trader), order block theory states that: • The last opposite-colored candle before a strong move contains institutional orders • Price often returns to test these zones before continuing • These zones act as strong support (bullish OB) or resistance (bearish OB) • Smart money defends their positions at these levels Why Order Blocks Work: • Unfilled Orders: Institutions may still have pending orders in the block • Position Defense: They protect their entries by adding to positions • Stop Placement: Retail stops cluster near these zones (liquidity for institutions) • Market Structure: Price respects these levels due to order flow dynamics ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🟢 Bullish Order Blocks Explained How They Form: 1. Price is consolidating or declining 2. Institutions begin accumulating (buying) 3. A strong bullish move erupts 4. The last bearish candle before this move = Bullish Order Block 5. This candle represents where institutions were buying aggressively Why The Last Bearish Candle? • Institutions absorbed all selling pressure at this level • Their buy orders filled as price was declining • When price returns, they defend this zone with more buying • It becomes a demand zone / support level Trading Bullish Order Blocks: Setup: • Wait for price to retrace back to bullish OB (green box) • Look for rejection/reversal pattern (pin bar, engulfing, etc.) • Enter long when price bounces from the OB zone • Stop loss: Below the order block • Target: Recent high or opposite order block Best Scenarios: • OB aligns with other support (trendline, fibonacci, round number) • First touch of OB (unmitigated) has highest probability • Occurs during high-volume sessions (London/NY) • Trend is bullish on higher timeframe Example Trade: • Bullish OB forms at $50,000 (last red candle before rally) • Price rallies to $52,000 then retraces • Price drops back to $50,100 (touching OB) • Bullish pin bar forms on the OB • Enter long at $50,200, stop at $49,800 • Target: $52,000+ (previous high) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🔴 Bearish Order Blocks Explained How They Form: 1. Price is consolidating or rising 2. Institutions begin distributing (selling) 3. A strong bearish move erupts 4. The last bullish candle before this move = Bearish Order Block 5. This candle represents where institutions were selling aggressively Why The Last Bullish Candle? • Institutions absorbed all buying pressure at this level • Their sell orders filled as price was rising • When price returns, they defend this zone with more selling • It becomes a supply zone / resistance level Trading Bearish Order Blocks: Setup: • Wait for price to retrace back to bearish OB (red box) • Look for rejection/reversal pattern (shooting star, bearish engulfing) • Enter short when price rejects from the OB zone • Stop loss: Above the order block • Target: Recent low or opposite order block Best Scenarios: • OB aligns with other resistance (trendline, fibonacci, round number) • First touch of OB (unmitigated) has highest probability • Occurs during high-volume sessions (London/NY) • Trend is bearish on higher timeframe Example Trade: • Bearish OB forms at $48,000 (last green candle before drop) • Price drops to $46,000 then retraces • Price rallies back to $47,900 (touching OB) • Bearish engulfing forms at the OB • Enter short at $47,800, stop at $48,200 • Target: $46,000- (previous low) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📊 How To Use This Indicator Strategy 1: Order Block Retest (Classic) Best For: Swing trading, capturing reversals Timeframes: 15min, 1H, 4H, Daily Win Rate: 60-70% (first touch) Entry Rules: 1. Identify unmitigated order block (bright color, not gray) 2. Wait for price to return to the OB zone 3. Look for price action confirmation: • Bullish OB: Pin bar, bullish engulfing, hammer • Bearish OB: Shooting star, bearish engulfing, doji 4. Enter in the direction of the OB 5. Stop loss: Beyond the opposite side of OB (20-30 pips) 6. Target: 2-3R or opposite OB Example: • Bullish OB at $100-$102 • Price drops to $101.50 (enters OB) • Bullish pin bar forms with low at $100.80 • Enter long at $102 (OB high), stop at $99.50 • Risk: $2.50, Target: $107.50 (3R) Strategy 2: Break & Retest Best For: Trend trading, breakout confirmation Timeframes: 5min, 15min, 1H Win Rate: 65-75% Entry Rules: 1. Price breaks through an order block 2. Wait for pullback to the broken OB 3. The OB now acts as support (if broken up) or resistance (if broken down) 4. Enter when price respects the flipped OB 5. Stop: Inside the OB zone 6. Target: Next OB or structure level Why It Works: Broken OBs flip polarity - support becomes resistance and vice versa Strategy 3: Multi-Timeframe Confirmation Best For: High-probability setups Timeframes: Combine 1H + 4H or 15min + 1H Win Rate: 70-80% Entry Rules: 1. Identify order block on higher timeframe (4H or Daily) 2. Switch to lower timeframe (1H or 15min) 3. Wait for lower TF order block to form within higher TF OB 4. Trade the lower TF OB in direction of higher TF OB 5. Stop: Below lower TF OB 6. Target: Edge of higher TF OB or beyond Why It Works: Alignment across timeframes = institutional consensus Strategy 4: Order Block to Order Block Best For: Range trading, swing entries Timeframes: 1H, 4H Win Rate: 55-65% Entry Rules: 1. Identify both bullish OB below and bearish OB above 2. Price is ranging between these OBs 3. Enter long at bullish OB, target bearish OB 4. Enter short at bearish OB, target bullish OB 5. Stop: Beyond the trading OB 6. Exit at opposite OB Why It Works: Price moves from one institutional zone to another Strategy 5: Mitigation Fade Best For: Aggressive scalping Timeframes: 5min, 15min Win Rate: 50-60% (higher risk) Entry Rules: 1. Price approaches an order block 2. Instead of bouncing, price breaks through (mitigates it) 3. Enter immediately in direction of breakout 4. Stop: Back inside the mitigated OB 5. Quick target: 1-1.5R Why It Works: When OB fails, it often leads to strong continuation ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ⚙️ Settings Explained Core Settings Auto-Adjust for Timeframe (Default: ON) • Automatically optimizes detection for current chart timeframe • 1min: 3 bars lookback • 5min: 4 bars lookback • 15min: 5 bars lookback • 1H: 6 bars lookback • 4H: 8 bars lookback • Daily+: 10-12 bars lookback • Recommended: Keep ON for best results Manual Detection Length (Default: 5) • Only used when Auto-Adjust is OFF • Number of bars to look back for the "last opposite candle" • Lower (2-4): More sensitive, more blocks, more noise • Higher (6-10): Less sensitive, fewer blocks, higher quality • Recommended: Use Auto-Adjust instead Display Settings Show Bullish/Bearish Order Blocks • Toggle each type on/off independently • Customize colors for each OB type • Tip: Match colors to your chart theme Max Order Blocks to Display (Default: 10) • Limits how many OBs are shown at once • Lower (5-8): Cleaner chart, only recent blocks • Higher (15-30): More historical context • Recommended: 8-12 for most trading Show Order Block Labels (Default: ON) • Displays "OB+" and "OB-" text on blocks • Shows 🎯 on active (nearest) block • Turn OFF for minimal chart appearance • Recommended: Keep ON for clarity Extend Blocks (bars) (Default: 50) • How far to extend OB boxes to the right • Lower (20-30): Shorter boxes, less clutter • Higher (100+): Longer boxes, easier to see • Blocks auto-extend until mitigated or limit reached • Recommended: 40-60 bars Filters Block Strength Filter (Default: Medium) • Controls how strong a move must be to create an OB • Low: 0.5x ATR move required - Many blocks, more noise • Medium: 1x ATR move required - Balanced quality/quantity • High: 1.5x ATR move required - Only strongest institutional moves • Recommended for beginners: High • Recommended for experienced: Medium • Recommended for scalpers: Low Min Block Size % (Default: 0.1) • Minimum size of OB as percentage of price • Filters out tiny, insignificant blocks • Crypto: 0.1-0.3% • Forex: 0.05-0.15% • Stocks: 0.1-0.5% • Adjust based on instrument volatility Advanced Settings Show Mitigated Blocks (Default: OFF) • When ON: Shows gray boxes for "used" order blocks • When OFF: Blocks disappear after mitigation • Use ON: For learning and analysis • Use OFF: For clean, active trading Highlight Active Block (Default: ON) • Highlights the nearest order block to current price • Active block shown with 🎯 emoji and brighter color • Helps focus on most relevant trading opportunity • Recommended: Keep ON ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📱 Info Panel Guide Bullish OB Count • Number of active (unmitigated) bullish order blocks • Higher number = More support zones below price • Multiple bullish OBs = Strong demand structure Bearish OB Count • Number of active (unmitigated) bearish order blocks • Higher number = More resistance zones above price • Multiple bearish OBs = Strong supply structure Bias Indicator • ⬆ [color=green]Bullish:[/color] More bullish OBs than bearish (demand > supply) • ⬇ [color=red]Bearish:[/color] More bearish OBs than bullish (supply > demand) • ↔ Neutral: Equal OBs on both sides • Trade in direction of bias for higher probability Near Indicator • Shows which OB price is closest to • Displays distance as percentage • Example: "Bull OB 0.85%" = Bullish OB is 0.85% below current price • Watch for "Near" alerts to time entries ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📱 Alert Setup This indicator includes 4 alert types: 1. Price Entering Bullish OB • Fires when price touches a bullish order block • Action: Watch for bounce/reversal pattern • High-probability long setup developing 2. Price Entering Bearish OB • Fires when price touches a bearish order block • Action: Watch for rejection/reversal pattern • High-probability short setup developing 3. New Bullish OB Detected • Fires when a new bullish order block forms • Action: Mark the zone for future retest • New demand zone identified 4. New Bearish OB Detected • Fires when a new bearish order block forms • Action: Mark the zone for future retest • New supply zone identified To Set Up Alerts: 1. Click "Alert" button (clock icon) 2. Select "Order Block Identifier" 3. Choose your alert condition 4. Configure notification method 5. Click "Create" Pro Tip: Set "Price Entering" alerts to catch trading opportunities in real-time ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 💎 Pro Tips & Best Practices ✅ DO: • First touch is best - Unmitigated OBs have highest win rate (60-70%) • Wait for confirmation - Don't buy/sell just because price touched OB • Use multiple timeframes - Higher TF OBs are stronger than lower TF • Combine with structure - OB + trendline/support = high probability • Trade with the bias - More bullish OBs = favor longs • Respect mitigation - Once OB is mitigated, it's less reliable • Use proper stop loss - Always place stops beyond the OB zone • Consider session timing - OBs work best during London/NY sessions ⚠️ DON'T: • Don't blindly buy/sell at OBs - Wait for confirmation • Don't ignore mitigation - Gray blocks are much weaker • Don't trade every OB - Quality over quantity • Don't fight strong trends - OBs can be run through in strong momentum • Don't use alone - Combine with price action, support/resistance • Don't expect 100% win rate - Even best OBs fail sometimes (30-40% of time) • Don't overtrade - Wait for A+ setups with confluence 🎯 Best Timeframes By Trading Style: • Scalpers: 1min, 5min (quick OB touches) • Day Traders: 5min, 15min, 1H (balanced view) • Swing Traders: 1H, 4H, Daily (major institutional zones) • Position Traders: 4H, Daily, Weekly (strongest OBs) 🔥 Best Instruments: • Excellent: Forex major pairs (EUR/USD, GBP/USD), BTC, ETH, ES, NQ • Good: Gold, Oil, Major indices, Large-cap stocks • Moderate: Altcoins, small-cap stocks (more noise) • Avoid: Very low liquidity instruments (OBs less reliable) ⏰ Best Times To Trade OBs: • London Session (03:00-12:00 EST): Highest OB respect rate • NY Session (08:00-17:00 EST): Strong OB reactions • London-NY Overlap (08:00-12:00 EST): Best probability • Asian Session: Lower probability, wait for London ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🎓 Advanced Order Block Concepts Order Block Flips (Polarity Change) When price breaks through an OB and closes beyond it: • Bullish OB that's broken becomes bearish (support becomes resistance) • Bearish OB that's broken becomes bullish (resistance becomes support) • Trading: Watch for retest of broken OB from opposite side Order Block Refinement When multiple OBs form at similar level: • Later OB "refines" or "replaces" the earlier one • Use the most recent OB as the active zone • Older OBs become less relevant Order Block Clusters Multiple OBs stacked close together: • Creates a "super zone" of institutional interest • Higher probability of reversal • Wider zone for entries (more room for confirmation) Fair Value Gaps + Order Blocks When OB aligns with Fair Value Gap: • Extremely high probability setup • Price is drawn to fill the gap AND test the OB • Double confluence = institutional magnet Order Block Mitigation Types • Full Mitigation: Price fully enters and closes inside OB • Partial Mitigation: Price wicks into OB but closes outside • False Mitigation: Quick touch then immediate rejection • Partial/false mitigation = OB still somewhat valid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📈 Common Order Block Patterns Pattern 1: The Perfect Retest • OB forms during strong move • Price continues 100-200+ pips • Price retraces back to OB • Clean bounce with confirmation candle • Highest probability pattern Pattern 2: The Double Tap • Price tests OB, bounces weakly • Price tests same OB again • Second test produces stronger reaction • Second touch often better entry Pattern 3: The Fake-Out • Price breaks through OB • Immediately reverses back • "Stop hunt" or liquidity grab • Enter after price reclaims OB Pattern 4: The Ladder • Multiple OBs stacked like stairs • Price steps from one OB to next • Each OB provides support/resistance • Trade OB-to-OB movements Pattern 5: The Failed OB • Price crashes through OB without pause • OB completely invalidated • Often signals strong momentum • Don't fight it, trade the breakout ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🚀 What Makes This Different? Unlike basic support/resistance indicators, Order Block Identifier: • ICT Methodology - Based on proven institutional concepts • Auto-Timeframe Optimization - Works perfectly on all timeframes • ATR-Based Detection - Adapts to each instrument's volatility • Mitigation Tracking - Knows when blocks are no longer valid • Active Block Highlighting - Shows most relevant opportunity • Smart Filtering - Only shows high-quality institutional zones • Visual Clarity - Clean, professional appearance • Real-Time Updates - Blocks update as price action develops Based On Professional Concepts: • ICT Smart Money Concepts (SMC) • Institutional order flow analysis • Market maker behavior patterns • Supply and demand zone theory ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📈 Upgrade Your Trading Arsenal This free indicator gives you institutional-level order block analysis. Want more? 🔥 Check out my premium scripts for: • Automated entries at order blocks with confirmation • Fair Value Gap detection combined with OBs • Multi-timeframe order block strategies • Breaker blocks and advanced ICT concepts • Complete smart money trading systems • And much more... 👉 Visit my profile to trade like institutions! ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📝 Important Notes • Order blocks are high-probability zones, not guarantees • Always use confirmation (price action patterns) • First touch of OB is most reliable (60-70% win rate) • Mitigated blocks are much weaker (30-40% win rate) • Works best during high-volume sessions • Combine with proper risk management (1-2% risk per trade) • Not all OBs are created equal - look for confluence • Practice on demo before trading live • Past performance doesn't guarantee future results Learning Curve: • Week 1-2: Learn to identify OBs and wait for retests • Week 3-4: Practice entry confirmation and risk management • Month 2-3: Combine with other analysis (MTF, structure, FVGs) • Month 3+: Develop personal OB trading system Disclaimer: For educational purposes only. Order block trading requires practice and proper risk management. Always do your own research. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🙏 Support This Work If this indicator helps you trade with institutions: • ⭐ Give it a thumbs up • 💬 Share your best order block trades in comments • 🔔 Follow for more free ICT/SMC tools • 🚀 Share with traders learning smart money concepts Questions about order blocks? Drop a comment and I'll explain! ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Developed with ❤️ for traders who want to see what institutions see ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Version History • v1.0 - Initial release with auto-timeframe detection and ATR-based strength filtering

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.