Verity Gold Structure MT5
- Indicatori
-
Hussein Haris
I am an MQL4/MQL5 developer with a focus on building intelligent trading systems that go beyond simple indicator-based logic. My work spans Expert Advisors, custom indicators, and strategy optimization for Gold (XAUUSD) and Forex markets on MetaTrader 4 & 5. - Versione: 1.0
- Attivazioni: 10
Market structure for Gold (XAUUSD): swings, BOS / CHoCH with a measured quality tag, liquidity sweeps, FVG and order blocks, H1 / H4 structure. Unconfirmed swings are shown as labelled pending previews; confirmed values never change, and the indicator re-checks itself on your chart on every candle.
VERITY shows Gold market structure the way it was confirmed - and proves that it does not change it afterwards.
A swing high is only known after price has failed to go higher for a while. VERITY waits for that confirmation: 5 closed candles. Until then it shows the candidate as a dashed PENDING 2/5 preview with the exact time it will confirm. When it confirms, it turns solid. When price goes beyond it first, it is marked "invalidated". Nothing moves silently.
1. Pending to Confirmed
- Pending swings are labelled "PENDING k/5" with the time they confirm ("confirms 16:30"). Across a market close the time is marked as an estimate ("~01:20"); across a weekend, "next session".
- Pending previews are never written to the indicator buffers and never sent as default alerts.
2. Verified no-repaint
- Published repaint report (rules version 7, results identical to version 6): real Gold tick history on M1, M5, M15 and H1, 16,159 candles - 327,218,040 re-checks of closed-candle values, 0 changed; full recalculation compared with the live values: 161,590 values, 0 different.
- The no-repaint audit runs inside the indicator on your chart: on every new candle it re-reads the last 500 closed candles and every confirmed event and shows "N confirmed, 0 changed".
- Live tests on a demo account, three Gold charts at once (M5, M15, H1):
version 1.0.0 (final confirmation run): 4 hours across the daily break, 289,118 re-checks, 0 changed, 0 runtime errors, no duplicate alerts;
version 0.8: 26 hours, including the daily break, a US CPI release and five reconnections: 2,404,647 re-checks, 0 changed, 0 runtime errors.
3. Break quality
- Every BOS and CHoCH is tagged Strong, Normal or Weak from measured values: candle body and close beyond the level, in ATR. A wick through a level that closes back inside is a sweep, not a break.
What else is on the chart
- Swing and internal structure: HH / HL / LH / LL, BOS / CHoCH lines with their label and quality dots.
- Flip level: the exact price whose close would change the swing trend ("Bullish until a close below 4,036.47").
- Liquidity: previous day / week high and low, Asia / London / New York session highs and lows, equal highs / lows, sweeps, and Sweep-to-CHoCH sequences linked as one event.
- Fair value gaps and order blocks with IDs (FVG-0001, OB-0001) and a lifecycle: Active, Touched, 50% mitigated, Mitigated.
- H1 and H4 structure without look-ahead, in a strip under the chart and as level lines.
- Panel: current structure, truth state (Aligned / Mixed / Conflicted / Transitioning / Neutral), last confirmed event with its ID, pending clock, nearest liquidity, premium / discount, session, next USD high-impact news (live charts), a short plain-language summary, and the audit.
- Evidence dock: recent events, active zones, invalidation map (internal, swing, H1, H4 flip levels with distance in ATR), pending clock, integrity.
- Every confirmed event has an ID and a record (time, level, body / ATR, penetration / ATR, quality) that never changes.
Clean chart
- At most 10 labels in the chart and 6 price tags at the right edge, no overlapping labels, newest candles always free.
- Three presets: Clean, Standard, Analyst. Dark and light themes follow the chart.
Alerts
- Confirmed BOS / CHoCH with quality, sweep, Sweep-to-CHoCH, H1 / H4 CHoCH, price near the flip level; optional: price entering an FVG / order block, internal breaks, pending previews. Popup, sound, push, e-mail.
- One alert per event - also after a reload, a timeframe change or with several charts open.
For EA developers
- 10 buffers via iCustom (trend, internal trend, event type, direction, level, quality, sweep flag, H1 / H4 trend, flip level). Confirmed data only; the forming candle is never written. Table in the manual.
- Path: iCustom(_Symbol, _Period, "Market\\Verity Gold Structure MT5").
Recommended use
- Symbol: Gold quoted in USD (XAUUSD, GOLD, and broker variants such as XAUUSDm, XAUUSD.f). Other symbols show a notice and are not calculated.
- Timeframes: M5 to H1 (works M1 to W1).
- Several Gold charts at once are fine (tested with three). Measured on a live demo: about 1 ms per candle on average (M5 / M15 / H1).
- Broker clock detected automatically: the server's GMT offset and summer-time rule are read from where Gold's daily break falls in the history (live and in the Strategy Tester) and shown in the panel. The previous day is Gold's trading day (ends at the 17:00 New York close). Manual inputs remain as an override.
Main inputs (every threshold has a documented default; full list in the manual)
- Symbol & history: Custom gold symbol name - only if your broker names Gold differently. Calculate from - a fixed start date keeps event IDs the same across sessions.
- Swings: Swing pivot bars on the left / right (5 / 5) - the right side is the number of closed candles needed to confirm a swing. Internal pivot (2 / 2).
- Structure: Break confirmation (close or whole body beyond the level). Minimum close beyond the level, 0.05 ATR - smaller close-throughs are not breaks. Strong / Weak thresholds in ATR.
- Liquidity: Equal highs / lows tolerance (0.1 ATR). Sweep depth (0.05 ATR). Bars allowed between a sweep and a CHoCH (10).
- Zones: FVG minimum gap (0.25 ATR). FVG / order block mitigation (50% fill / first touch). How many unmitigated zones to keep (6 / 4).
- Higher timeframes: H1 / H4 history calculated before the first chart bar.
- Evidence and Repaint audit: events shown in Market Memory (12). Closed bars re-checked every new bar (500).
- Time & sessions: Broker GMT offset mode (Auto from the daily break, or Manual). Asia, London and New York session hours in local time.
- News: Use the economic calendar (live charts only), currency USD.
- Chart: Preset (Clean / Standard / Analyst). Label and price-tag limits. Keep candles clear of the panel.
- Panel: Layout, theme (Auto follows the chart background), position.
- Alerts: one switch per alert type; zone and pending alerts are off by default. Popup, push, sound, e-mail.
- Performance: Bars to compute on load (5000).
Limitations - please read
- A swing confirms after 5 closed candles. That delay is the price of never repainting.
- VERITY describes market structure. It does not forecast, gives no buy / sell signals and shows no win rates or probabilities.
- News (economic calendar) is available on live charts only; the Strategy Tester has no calendar.
- Gold only in this version.
- Tested live on one broker (GMT+2/+3, EU summer time); automatic clock detection verified on six other server clocks.
Download the free demo and test it in the Strategy Tester on your broker's Gold symbol before buying.
