Order Block Zones for Smart Money Concepts
Info
The Order Block Zones for Smart Money Concepts is a Indicator for MetaTrader 5 that an order block on gold (xauusd) or any symbol is defined as the last opposite candle before a move that breaks structure. Specifically, it is the last bearish candle before a close above a confirmed swing high, or the last bullish candle before a close below a confirmed swing low.
Usage
This tool is typically used for enhancing chart analysis and decision making.
Platform
This Indicator works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Indicators folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use Order Block Zones for Smart Money Concepts
1. Installation: Place your file in the MQL/Indicators folder via "Open Data Folder" and restart your terminal.
2. Loading: Find the indicator in the Navigator, drag it onto your chart, and configure the input parameters in the popup window.
3. Customization: Press Ctrl+I to open the indicator list, select your tool, and click "Properties" to change colors, levels, or visual styles.
4. Updating: Replace the old file in the Indicators folder with the new version and restart the platform to apply changes.
Frequently Asked Questions
Q: Why is my indicator not showing? A: Verify the file is in the MQL/Indicators folder, or try right-clicking the "Indicators" tree in the Navigator and clicking "Refresh."
Q: Do custom indicators slow down the platform? A: Too many complex indicators can impact performance; remove unused ones via the "Indicator List" (Ctrl+I).
Q: Can I use MT4 indicators on MT5? A: No, MQL4 and MQL5 are distinct languages; ensure the indicator is compiled specifically for your platform version.
What this tool does
An order block on Gold (XAUUSD) or any symbol is defined as the last opposite candle before a move that breaks structure.
Typical Use Case
This Indicator excels in automated trading and technical analysis on MetaTrader 5.
Compatible Platform & Setup
This Indicator works on MetaTrader 5. Place the file in the MQL5/Indicators folder and restart the terminal.
Description & Settings
Related: Order Block Marker with Mitigation Tracking - another powerful indicator for MetaTrader 5 traders.
An order block on Gold (XAUUSD) or any symbol is defined as the last opposite candle before a move that breaks structure. Specifically, it is the last bearish candle before a close above a confirmed swing high, or the last bullish candle before a close below a confirmed swing low. This candle then forms a zone, which can be drawn from its high to low or using the body only.Also recommended: MTF Order Block Zones Indicator for MT4/MT5 - similar indicator with strong performance on MetaTrader 5.
The impulse leg must demonstrate significant momentum, with at least one candle having a body larger than a multiple of the Average True Range (ATR). This ensures that slow price drifts do not generate zones. A new, untested zone is displayed in color, while a zone that has been tested is dimmed. A zone is removed entirely when price closes beyond it.
Swings are confirmed only after the candles on both sides have closed. Consequently, a zone appears a few bars after the price move and does not repaint. A zone indicates the origin of a price move, not necessarily a point where price must reverse. It is recommended to test the indicator on your preferred symbol and timeframe before incorporating it into live trading.
Settings
Swing length
: This parameter defines the number of bars on each side required to confirm a swing high or low. The default value is 5.
Impulse filter
: The largest candle body within the impulse leg must be at least this many times the ATR value. The default is 1.0. Setting this to 0 disables the filter.
ATR period
: The period for the ATR calculation. The default is 14.
Zone drawn from the candle
: Determines whether the zone is drawn using the full candle range (high to low) or the candle body only.
Bars to scan
: The amount of historical data to scan when the indicator loads. The default is 1500.
Show bullish / bearish
,
maximum live zones per side
,
keep broken zones
: These settings control the visibility and management of zones, along with four customizable colors for zone display.
Alerts
: Configure alerts for the appearance of a new order block and the first return of price to a fresh zone. Alerts can be delivered via popup, push notification, and sound.
Object prefix
: This allows for running multiple instances of the indicator on the same chart, for instance, by using different swing lengths. Simply change the prefix for each instance.
Requirements
This indicator is compatible with any symbol, timeframe, and broker. It functions by drawing rectangles and does not engage in automated trading.
Personalization
Experiment with the zones on various instruments such as XAUUSD, EURUSD, GBPUSD, US30, and NAS100. Compare results on M15 and H1 for intraday trading, and H4 for swing trading. A smaller swing length will yield more zones, while a larger one will highlight only the primary price legs. Order blocks are a fundamental component of Smart Money Concepts. For enhanced analysis, consider using this indicator alongside tools for Break of Structure (BOS), Change of Character (CHoCH), and Fair Value Gaps (FVG). The XP_CheckBreak function identifies zones, and XP_UpdateZones tracks them, making them suitable for integration into Expert Advisors (EAs) that await the initial price return to a fresh zone.
About this code
This is an open-source indicator. Feel free to use, adapt, or build upon it to create your own versions.
New versions and tools are announced on the MQL5 channel.
Questions, suggestions, and shared backtests are welcomed in the Xander Lab group.
Additional tools are available on the profile.
Provided as is, use at your own risk.
Related Tools
Smart Money Concepts BOS CHoCH
Supply Demand Zones
Candle Timer Countdown
Changelog
v1.0 - 2026-11-02 - Initial release
You may also like: Order Blocks and Breaker Blocks (SMC) - No Repaint, with Mitigation and Alerts - excellent alternative for indicator users on MetaTrader 5.
Source Code
#property copyright "RobotFX"
#property link "https://robotfx.org"
#property version "1.00"
#property description "This code is educational. Feel free to use, modify and upgrade as you wish. Visit ROBOTFX.ORG for professional trading tools"
#property indicator_chart_window
#property indicator_buffers 0
#property indicator_plots 0
enum ENUM_XP_OBZONE
{
XP_ZONE_WICK = 0,
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.