Gold Weekend Gap Analysis: Size, Fill Time, and ADR Context

Gold Weekend Gap Analysis: Size, Fill Time, and ADR Context
Download ALL MT5 indicators (6071)
YouTube Video Thumbnail



Similar MetaTrader Tools

Gold Weekend Gap Analysis: Size, Fill Time, and ADR Context

Info

The Gold Weekend Gap Analysis: Size, Fill Time, and ADR Context is a Indicator for MetaTrader 5 that gold weekend gap map is a metatrader 5 indicator for xauusd and any symbol with a weekend closure. It identifies gaps created when the market reopens after a weekend pause, displaying them as zones between Friday's close and the new opening price.

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 Weekend Gap Analysis: Size, Fill Time, and ADR 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 Weekend Gap Map is a MetaTrader 5 indicator for XAUUSD and any symbol with a weekend closure.

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 Weekend Gap Map is a MetaTrader 5 indicator for XAUUSD and any symbol with a weekend closure. It identifies gaps created when the market reopens after a weekend pause, displaying them as zones between Friday's close and the new opening price. The indicator provides practical insights into gap size relative to Average Daily Range (ADR), whether the gap has been filled, and the time taken for the fill.

Also recommended: Gold Level Map for XAUUSD: Key Levels and Trading Context - similar indicator with strong performance on MetaTrader 5.


This indicator does not place, modify, or close orders, nor does it generate trade signals.

Features

Gap Zones
Displayed on the chart with distinct colors: green for an upward gap and red for a downward gap. The zone extends from the last bar before the market pause to the bar that retraced to Friday's close, visually representing the duration the gap remained open.

Gap Labels
Adjacent to each gap zone, a label provides: the gap size in price, the gap size in ADR, and the fill time. For example: +37.46 | 0.44 ADR | filled 1.1d. Unfilled gaps are marked as 'OPEN', with a dashed gold line indicating the price level of Friday's close, which represents the fill target.

Opening Panel
A dedicated panel shows details for the latest opening, including time, size in price, size in ADR, and status (filled, or remaining distance to Friday's close).

Gap Statistics
For the last N gaps (default 104, approximately two years of weeks), the panel displays: median and 90th percentile gap size, median gap size in ADR, the proportion of upward gaps, and the percentage of gaps filled within the first hour, within 24 hours, and within N trading days.

Mini Chart
A visual representation of the latest 26 gaps. The height of each bar corresponds to the gap size in ADR, and the color indicates the gap direction. A gold color signifies an open gap.

Optional Alerts
An alert can be configured to trigger when a weekly opening gap exceeds a specified ADR threshold (default 0.20). Push notifications are also available.

Object Naming
All indicator-generated objects use the prefix 'GWGM_' and are automatically removed when the indicator is detached.

Measurement Methodology

Gap Definition
A gap is defined as the difference between the opening price of the first H1 bar after a quote pause of at least 36 hours and the closing price of the last bar before that pause. By default, only openings on Sunday or Monday are considered, making it primarily a weekend tool. Extended holiday closures ending on these days are also included.

ADR Calculation
ADR (Average Daily Range) is calculated using the high-to-low range of the 14 completed daily bars preceding the gap. Expressing the gap size as a fraction of ADR allows for more consistent comparison across different price levels of gold.

Gap Fill Definition
A gap is considered 'filled' when a subsequent H1 bar trades at or beyond Friday's close price, including the opening bar itself. 'Filled within the first hour' means the opening H1 bar reached the fill price.

Fill Table Logic
In the fill statistics table, gaps that are still open and fall within the specified lookback window are excluded from calculations for that window, preventing recent gaps from skewing the fill rates before they have had sufficient time to be filled.

Data Stability
All calculations are based on completed historical data, with the forming bar used for ongoing fill checks. Once a gap is marked as filled, this status is permanent and will not be revised.

Performance on XAUUSD

Analysis of 509 weekly openings on one broker server (FreshForex-MT5) from January 2017 to November 2026 revealed the following statistics (measured using H1 bars):

Gap Size (Share of ADR)

Number of Gaps

Filled in 1st Hour

Filled Within 24 Hours

Filled Within 5 Trading Days

Under 0.05

272

83%

97%

98%

0.05 – 0.10

107

67%

90%

95%

0.10 – 0.25

85

39%

81%

89%

Over 0.25

43

2%

42%

70%

This data suggests that smaller gaps are frequently filled quickly, often within the first hour. Larger gaps, however, are less predictable in their fill times, with less than half of gaps exceeding a quarter of an ADR being filled within a day. The notion that 'gaps always fill' is not a reliable strategy for gold. These figures represent historical data from a specific server and are not predictive. Your broker's historical data may vary.

Indicator Inputs

Input Parameter

Default Value

Description

Pause, hours

36

Minimum pause in quotes required to identify a gap.

Weekend only

true

If true, only openings on Sunday or Monday are considered.

ADR days

14

The number of completed daily bars used for ADR calculation.

Statistics lookback

104

The number of recent gaps included in the panel statistics.

Fill window, days

5

The maximum duration in trading days to consider for gap fill analysis.

Gaps drawn

12

The number of the latest gaps to be visually represented on the chart.

Labels / open target

on / on

Enables gap size and fill labels, and the dashed line indicating Friday's close when a gap is open.

Minimum zone width, hours

24

Ensures that quickly filled gaps remain visible on higher timeframes.

Alert, threshold in ADR, push

off, 0.20, off

Configuration for alerts on large weekly opening gaps, including ADR threshold and push notification option.

Panel, offsets, font, colours

Display settings for the indicator panel, including offsets, font, and colors.

Usage Guidelines

Apply the indicator to an XAUUSD chart set to H1 or H4 timeframe. All gap measurements are derived from H1 data, regardless of the chart's displayed timeframe.

On Mondays, focus on the gap size in ADR rather than solely in price terms. A 0.03 ADR gap and a 0.4 ADR gap represent significantly different market events.

If you manage positions that span weekends using Expert Advisors, assess the historical frequency of gaps of similar size remaining open for extended periods. This can inform you about the risk of your stop-loss orders being filled at unfavorable prices.

Do not use an open gap as a trading target or signal. The indicator provides a measurement of past price action.

Requirements

MetaTrader 5 platform.
Suitable for any symbol that experiences a weekend break. Default settings are optimized for gold (XAUUSD).
Requires H1 chart history for gap analysis (approximately two years for 104 gaps) and D1 chart history for ADR calculation.
No DLLs, WebRequests, or internet access are needed. The indicator does not engage in automated trading.

You may also like: Gap and Weekend Map: Analyzing Gap Fill Behavior Relative to ATR - 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_plots   0
#property indicator_buffers 0
input group "1. Gap detection"
input int    InpMinBreakHours  = 36;
input bool   InpWeekendOnly    = true;

.......

Leave your opinion, ask a question, share some knowledge

⚠ 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.
© ROBOTFX Free educational tools by RobotFX. Use entirely at your own risk; we are not liable for any financial losses incurred.