Gold Level Map for XAUUSD: Key Levels and Trading Context
Info
The Gold Level Map for XAUUSD: Key Levels and Trading Context is a Indicator for MetaTrader 5 that gold level map is a metatrader 5 indicator designed for xauusd and other symbols. It displays key price levels that gold traders monitor: round numbers, previous day's high and low, previous week's extremes, and the percentage of the average daily range used so far.
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 Gold Level Map for XAUUSD: Key Levels and Trading Context
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
Gold Level Map is a MetaTrader 5 indicator designed for XAUUSD and other symbols.
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: Gold Volatility and Risk Meter: ATR Regimes and Stop Cost Analysis for XAUUSD - another powerful indicator for MetaTrader 5 traders.
Gold Level Map is a MetaTrader 5 indicator designed for XAUUSD and other symbols. It displays key price levels that gold traders monitor: round numbers, previous day's high and low, previous week's extremes, and the percentage of the average daily range used so far. A compact dark panel shows the distance to these levels in both monetary value and H1 Average True Range (ATR). This indicator does not place, modify, or close orders and does not provide trade signals.Also recommended: Gold Weekend Gap Analysis: Size, Fill Time, and ADR Context - similar indicator with strong performance on MetaTrader 5.
Features
Psychological Levels: Displays major and mid psychological levels (e.g., 100 and 50 on gold, with automatic or manual steps for other symbols). Optional minor levels are available.
Chart Labels: Show the level tag, price, and distance from the last bid (e.g., 00 3500.00 -15.40).
Prior Extremes: Includes previous day's high and low (PDH/PDL), current day's open, and previous week's high and low (PWH/PWL). Optional levels include the week's open and previous month's extremes.
ADR Budget: Shows the average range of the last 14 completed daily bars, the percentage of this range used today, and dotted projections at day-open ± ADR.
Reaction Table: On closed H1 bars only, it tracks tests, bounces, and breaks of levels, along with the bounce rate for the nearest figures. Open episodes are logged but excluded from the bounce rate calculation.
Optional Alerts: Provides alerts when a closed bar first touches a major level, mid level, or PDH/PDL. Limited to one alert per level per day.
Display Customization: Features a dark-theme panel with auto-scaling, configurable colors, fonts, and widths. Objects are prefixed with GLM_ and removed upon indicator removal.
No Repaint: Historical signals are not repainted. Previous period extremes use completed bars, and reactions/alerts use closed bars. Today's high, low, and distances update dynamically.
Versatility: Works on any symbol and timeframe with sufficient D1 and H1 history. Defaults are optimized for gold.
Combined Levels: If a prior extreme coincides with a round number, a single line is displayed with a label indicating both (e.g., PDH/00 3700.00 +27.60).
How Reaction Statistics Are Determined
The reaction table maps recent behavior, not future predictions.
Data Usage: Only closed H1 bars are used; the current bar is excluded.
Test Definition: A test begins when a closed H1 bar trades through a level after the previous close was clearly on the opposite side.
Episode Handling: The system waits up to N H1 bars (default 24) for the next move:
Bounce: The close occurs back on the approach side, within the defined buffer.
Break: The close occurs beyond the level, by at least the buffer amount.
Open: The maximum episode bar limit is reached without a bounce or break; these are excluded from the bounce rate.
Buffer: The decision buffer is set at 0.20 × H1 ATR by default.
Bounce Rate Calculation: The bounce rate is calculated as bounces / (bounces + breaks) over the specified lookback period (default 60 days).
Interpretation: A bounce rate near 50% indicates the level is actively watched by traders but does not guarantee it will hold.
Illustration on Public Gold Data
The provided screenshots use COMEX Gold futures (GC=F) daily bars from Yahoo Finance, from January 1, 2023, to November 20, 2026. This data is used for illustrative purposes and is not a direct replication of broker XAUUSD charts. The indicator script processes the chart's symbol and evaluates reactions on H1.
Based on a public daily sample with a buffer of 0.20 × the median daily range (approximately $8.2):
Hundred-levels: Showed 29 levels with at least five tests, resulting in 421 tests, 222 bounces, 199 breaks, and a bounce rate of 52.7%.
Fifty-levels: Showed 29 levels with at least five tests, resulting in 444 tests and a bounce rate of 50.0%.
Note: Individual figure performance varies, and figures with few tests can produce noisy results. The bounce rate is presented alongside raw counts for context.
Inputs
Round Numbers
Input
Default
Meaning
Major step
0 (auto)
Auto uses a 1-2-5 step, approximately 2.5% of price (e.g., 100 for gold, 0.01 for EURUSD, 1000 for BTC).
Levels each side
4
Number of major figures displayed above and below the current price.
Show mid / minor levels
mid on, minor off
Mid levels are half the major step; minor levels are one-tenth.
Prior Extremes and ADR
Input
Default
Meaning
PDH, PDL, day open, PWH, PWL
on
Previous highs and lows based on completed periods only.
Week open, PMH, PML
off
Optional settings.
ADR lookback
14
Uses completed daily bars only.
Show ADR projections
on
Displays dotted lines at day-open ± ADR.
Reaction Statistics and Alerts
Input
Default
Meaning
Lookback days
60
Window period for the H1 reaction table.
Episode bars
24
Maximum H1 bars to wait for a bounce or break.
Decision buffer, ATR
0.20
Size of the bounce/break filter, expressed in H1 ATR.
Reaction rows
6
Number of nearest figures displayed in the table.
Alerts
off
Alerts trigger on closed-bar touches only; support popup, push, and sound notifications.
Display and Colors
Input
Default
Meaning
Show panel / show distance
on
Option to disable distance display on chart labels.
Auto-scale
on
Font size and panel width adjust to chart size. User-settable base font size remains.
Panel corner, offsets, width
left upper, width 0
Width 0 means auto-adjust.
Font, label shift, line widths
Consolas, shift 0
Shift 0 means auto-adjust.
Colors
dark gold / teal palette
All line, label, and panel colors are configurable.
How to Use
Attach the indicator to your XAUUSD chart or any other symbol. H1, M15, and H4 timeframes are suitable starting points.
Before planning a trade, consider the nearest round numbers (00/50) and the remaining ADR. If the day's trading has already exceeded 100% of the ADR, late entries may have less
You may also like: PDH PDL Sweep Levels Indicator - excellent alternative for indicator users on MetaTrader 5.
Source Code
#property copyright "RobotFX"
#property link "https://robotfx.org"
#property version "1.10"
#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_plots 0
#property indicator_buffers 0
input group "1. Round numbers"
input double InpMajorStep = 0;
input int InpLevelsEachSide = 4;
.......
⚠ 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.