Loading…

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

SettingDefaultWhat it does
Snapshot bars500How many recent closed bars to keep snapshotted
Tolerance points0.5Ignore a change smaller than this many points (rounding noise)
Check opentrueCheck Open for revision
Check hightrueCheck High for revision
Check lowtrueCheck Low for revision
Check closetrueCheck Close for revision
Check volumefalseCheck tick volume for revision
Alert on revisiontrueShow an Alert popup the moment a revision is caught
Marker colorclrRedMarker colour for a revised bar
Marker width3Marker arrow width

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Alerts · Buy/Sell Arrows · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria