History Revision Highlighter
A closed bar should never change. In practice, feeds do occasionally rewrite recent history - a bad-tick purge, a vendor correction, a re-feed after a connection gap - and MetaTrader has no built-in warning when this happens. A strategy backtested or monitored against history that quietly shifted under it is testing against data that no longer matches what actually printed at the time. This tool keeps its own independent memory. The first time it sees a closed bar, it records that bar's Open, High, Low, Close (and optionally tick volume) as a baseline snapshot. On every later tick, it compares the CURRENT value the terminal reports for that same bar against the recorded baseline. Any difference beyond a small tolerance (to absorb harmless floating-point/rounding noise, not genuine broker rewrites) is reported once: an arrow marker appears on the bar, a line goes to the Experts log, and - if enabled - a popup Alert fires immediately. Only fully closed bars are checked. The currently forming bar legitimately updates every tick as new ticks arrive; that is normal price action, not a revision, and is excluded from the comparison entirely. Notes and limitations - Detection only covers bars that were actually snapshotted while this indicator was running. History that was already loaded and potentially already revised before attachment, or history outside the InpSnapshotBars window, cannot be checked retroactively. - Each revised bar is reported once - if the same bar is revised a second time after already being flagged, that second change is not reported again (the marker and log entry describe the first detected change only). - A history reload triggered by the terminal itself (e.g. switching timeframes and back, or a manual "Refresh" that re-requests the same range) can look identical to a genuine broker-side revision if the reload happens to return slightly different values - this tool cannot distinguish the two causes, only that the value changed. - The snapshot memory lives only in the running indicator instance; removing and re-attaching the indicator restarts the baseline from scratch.
Indicator · MT5 · v1.0 · Free
About History Revision Highlighter
History Revision Highlighter is an indicator for MetaTrader 5. It draws buy and sell arrows on the chart and can alert you with a pop-up, sound, email or push message. It has 10 settings, such as Snapshot bars, Tolerance points and Check open. MQL source code included.
Files in the download: HistoryRevisionHighlighter.ex5, HistoryRevisionHighlighter.mq5, HistoryRevisionHighlighter.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Snapshot bars | 500 | How many recent closed bars to keep snapshotted |
| Tolerance points | 0.5 | Ignore a change smaller than this many points (rounding noise) |
| Check open | true | Check Open for revision |
| Check high | true | Check High for revision |
| Check low | true | Check Low for revision |
| Check close | true | Check Close for revision |
| Check volume | false | Check tick volume for revision |
| Alert on revision | true | Show an Alert popup the moment a revision is caught |
| Marker color | clrRed | Marker colour for a revised bar |
| Marker width | 3 | Marker arrow width |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: Alerts · Buy/Sell Arrows · MT5 Indicator · MQL5 Source Code