OPEN-SOURCE SCRIPT
ICT Order Block Identifier [Eหฃ]

๐ฆ 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
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Market Solver Pro: The automated system for disciplined traders. Includes: Trend Validation, Entries, and Risk Management. ๐ Stop Guessing. ๐ Start Executing.
Get the Signals & Free Guides:
โก๏ธ patreon.com/marketsolverpro
Get the Signals & Free Guides:
โก๏ธ patreon.com/marketsolverpro
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Market Solver Pro: The automated system for disciplined traders. Includes: Trend Validation, Entries, and Risk Management. ๐ Stop Guessing. ๐ Start Executing.
Get the Signals & Free Guides:
โก๏ธ patreon.com/marketsolverpro
Get the Signals & Free Guides:
โก๏ธ patreon.com/marketsolverpro
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.