Watch how to download trading robots for free
Find us on Facebook!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Scripts

Broker Tick and Rollover Spread Forensic Auditor - script for MetaTrader 5

Denis Remy Khansa
Denis Remy Khansa
Founder of Azimuth Studio — Compiled CPU Walk-Forward & Multi-EA Portfolio Studio for MetaTrader 5
Views:
22
Rating:
(1)
Published:
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
Why do many MetaTrader 5 strategies produce a smooth equity curve on OHLC M1 bars, yet hit unexpected Stop-Losses or breach daily floating drawdown limits on live accounts?

In practice, the discrepancy usually comes from three hidden factors inside historical broker tick feeds:
1. Rollover spread widening between 23:00 and 00:15 server time (often 3x to 8x wider than London liquidity).
2. Unnoticed weekday intraday feed blackouts (> 15 minutes) where stops jump across price gaps.
3. Inverted (Ask < Bid) or single-sided ticks in cached history containers.

How It Works (100% Read-Only, Zero DLLs, Memory-Safe):
Attach Azimuth_Tick_Audit_Exporter.mq5 to any chart in MetaTrader 5. It streams up to 120 months of real broker Bid/Ask ticks via CopyTicksRange in 15-day memory-safe chunks and produces:

1. Session-by-Session Real Spread Percentiles (Median P50 and P95 in Pips):
- London + NY Overlap (12:00 - 16:00)
- London Session (07:00 - 12:00)
- Asian Session (01:00 - 06:00)
- Rollover Window (23:00 - 00:15): Median, P95, Max spread, and exact Rollover Widening Ratio vs London.

2. Feed Integrity and Weekday Blackout Audit:
- Counts inverted quotes (Ask < Bid), out-of-order millisecond timestamps, and single-sided quotes.
- Detects weekday intraday feed blackouts above your threshold (ignoring weekend closures and Dec 25 / Jan 1 bank holidays) and prints the Top 3 longest blackouts with timestamps.

3. Clean Chunked CSV Export (Optional, Enabled by Default):
- Writes a standalone human-readable forensic report (MQL5\Files\TickAudit_SYMBOL_DATE.txt).
- Writes a clean UTF-8 millisecond tick CSV (MQL5\Files\Azimuth_SYMBOL_TICKS_DATE.csv) with self-describing symbol, digits, and contract metadata (#AZIMUTH_META) for quantitative Walk-Forward and slippage stress analysis.

Input Parameters:
- InpMode: Audit Real Ticks + Export Clean CSV | Audit Only (No CSV) | Export M1 OHLC + Spread CSV
- InpMonthsBack: History depth to analyze (1 to 120 months, default 12)
- InpCustomSymbol: Target symbol (empty = current chart; auto-resolves broker suffixes)
- InpGapThresholdMinutes: Minimum weekday blackout duration to flag (default 15 minutes)

- InpShowSummaryDialog: Display summary popup when completed

Azimuth_Tick_Audit_Chart_WhiteBG_750px.png


Azimuth_Tick_Audit_WhiteBG_750px.png

Relative Volume (RVOL) Indicator in a Subwindow Relative Volume (RVOL) Indicator in a Subwindow

Relative Volume (RVOL) in a subwindow: the volume of every bar divided by its normal volume, drawn as a color-coded histogram with reference levels and a live text label.

Point of Control (POC) and Value Area Lines for the Day Point of Control (POC) and Value Area Lines for the Day

Builds a volume profile for every day and draws its Point of Control (POC) and the Value Area boundaries (VAH and VAL) as horizontal lines on the chart. The levels of the current day are updated as the day develops.

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

MACD Signals MACD Signals

Indicator edition for new platform.