Smart Zone Order Block and Structure Tool
- Indicatori
- Roshan Bariya
- Versione: 1.0
- Attivazioni: 5
HTF Zone — Structure & Order Block Indicator for MT5
Identifies CHoCH, BOS and Order Blocks inside your manually drawn HTF supply/demand zone. Works on any symbol and timeframe. Push alerts included.
FULL DESCRIPTION
HTF Zone is a market structure and order block indicator for MetaTrader 5 that works inside a zone you define. Unlike generic OB indicators that draw boxes everywhere on the chart, this tool focuses its entire analysis within a Higher Timeframe rectangle you draw manually — giving you precise, context-aware signals rather than noise.
How It Works
You draw a rectangle on your chart and name it HTF_Up_ (for a bullish zone) or HTF_Down_ (for a bearish zone). The indicator then automatically:
- Detects pivot highs and lows inside the zone
- Identifies CHoCH (Change of Character) — the first sign of trend reversal
- Identifies BOS (Break of Structure) — trend continuation confirmation
- Draws the Order Block that caused the CHoCH — the candle most likely to be revisited for entry
- Sends a push notification to your phone when price closes inside the OB
This workflow matches how Smart Money Concept (SMC) and ICT traders manually analyze charts — the indicator automates the repetitive detection work while leaving the zone selection and trade decision to you.
Key Features
- Works on any symbol — Forex, Gold, Indices, Crypto
- Works on any timeframe — M1 to Monthly
- Two structure layers: Internal (fast, default 3-bar pivot) and Swing (slow, default 50-bar pivot) — both configurable
- Directional OB filtering — only draws bullish OBs in Up zones, bearish OBs in Down zones
- OB mitigation tracking — OB fades visually when price has traded through it
- On-chart dashboard — shows zone name, direction, price range, OB count and current timeframe
- Push notifications — alerts when a candle closes inside an active OB, and when a CHoCH break happens
- Fully configurable colors — all structure lines, OB boxes, and zone border colors are customizable inputs
- No repainting — all detections are based on closed candles only
Input Parameters
Zone Detection
- PrefixUp — rectangle name prefix for bullish zones (default: HTF_Up_ )
- PrefixDown — rectangle name prefix for bearish zones (default: HTF_Down_ )
Structure
- InpInternalLen — pivot length for internal structure (default: 3)
- InpSwingLen — pivot length for swing structure (default: 50)
- InpShowInternal — show/hide internal CHoCH and BOS lines
- InpShowSwing — show/hide swing CHoCH and BOS lines
Order Blocks
- InpShowInternalOB — show/hide internal order block
- InpShowSwingOB — show/hide swing order block
- InpOBExtBars — how many bars the OB box extends to the right (default: 200)
Display
- ZoneColor — color of the zone border (default: Gold)
- ShowLabels — show/hide all text labels
- LineExtBars — how many bars structure lines extend past the break point
- DashboardX / DashboardY — dashboard panel position on screen
Notifications
- EnablePushAlerts — push notification to mobile app
- EnablePopupAlerts — popup alert on desktop
How to Use — Step by Step
Step 1: Identify your HTF zone Switch to your Higher Timeframe chart (H4, Daily, etc.) and identify a significant supply or demand zone — an area where price previously made a strong move.
Step 2: Draw the rectangle Use the Rectangle tool (keyboard shortcut: press the rectangle icon in the toolbar). Draw a box over your zone. Name it by double-clicking the rectangle and typing:
- HTF_Up_zone1 for a demand / bullish zone
- HTF_Down_zone1 for a supply / bearish zone
You can use any suffix after the prefix — the name just needs to start correctly.
Step 3: Switch to your entry timeframe Go to M15, M5, or whatever timeframe you use for entries. The indicator will automatically analyze structure inside the zone you drew.
Step 4: Attach the indicator Open the Navigator panel (Ctrl+N), find HTF Zone under Indicators → Market. Drag it onto your chart. Click OK.
Step 5: Read the signals
- A teal/green CHoCH line inside the zone = bullish structure shift — look for buys
- A red CHoCH line inside the zone = bearish structure shift — look for sells
- A blue OB box = the bullish order block to watch for entry
- A red OB box = the bearish order block to watch for entry
- When price enters the OB box and a candle closes inside it, you receive a push notification: Candle Closed inside BUY OBs. BUY on EURUSD
Step 6: Manage the trade manually This indicator does not place trades. You decide entry, stop loss, and take profit based on the OB levels shown and your own risk management rules.
Precautions and Important Notes
This indicator does not place trades. It is a visual analysis and alert tool only. All trade decisions are your responsibility.
- Draw the rectangle before attaching the indicator. The indicator searches for the rectangle on startup. If no rectangle is found it shows a message on the dashboard.
- Rectangle name is case-sensitive. HTF_Up_zone1 works. htf_up_zone1 does not. The default prefixes are HTF_Up_ and HTF_Down_ — change them in inputs if needed.
- Only one rectangle is read at a time. If you have multiple rectangles the indicator reads the first one it finds. Use one rectangle per chart.
- Zone must be wide enough. If the rectangle covers fewer bars than the pivot length setting, the indicator cannot detect structure and will show "Zone too narrow." Draw a wider rectangle or reduce InpSwingLen .
- For push notifications to work you must have the MetaTrader 5 mobile app installed and linked to your MQL5 account. Go to MT5 → Tools → Options → Notifications and enter your MetaQuotes ID from the mobile app.
- OB mitigation: When price trades through the OB (high for bullish, low for bearish), the box fades in color to indicate it has been mitigated. Mitigated OBs are less reliable for entry.
- This tool works best when used with a top-down analysis approach: identify the HTF zone on H4 or Daily, then look for CHoCH and OB confirmation on M15 or M5.
- Past structure does not guarantee future reaction. No indicator predicts the market with certainty. Always use proper risk management and never risk more than you can afford to lose.
