Loading…

Quote Flicker Detector

Every trader has watched a price print, snap back, and print again a moment later with nothing actually having happened in the market. This script turns that impression into a number by watching three consecutive distinct tick prices at a time: if the third matches the first and the whole round trip completed inside a chosen time window, it counts as a flicker rather than genuine movement. Two ticks alone cannot show a bounce - "price moved" and "price moved and immediately snapped back" look identical from a single tick-to-tick comparison. The script keeps a short rolling history of the last three distinct prices specifically so it can tell the difference, which is the whole point of running it rather than eyeballing the Bid line. The result is a flicker rate - what share of all price transitions were flickers rather than real moves - and, optionally, a CSV log of every individual flicker with its away price, back price and bounce time. A feed with a high flicker rate is telling a trader far less about actual price discovery than the raw tick count suggests. Notes and limitations - Only the current chart's symbol is watched. Running the script on several charts at once compares symbols side by side. - A flicker requires the price to return to EXACTLY its previous value, not merely close to it - broker feeds that re-quote with a slightly different price on the way back will not register as a flicker under this definition. - The script occupies the calling thread for its entire duration and cannot run in the background the way an indicator or expert can. - This measures the Bid stream only; a feed that flickers on Ask while Bid stays still is not captured.

Script · MT4 · v1.0 · Free

About Quote Flicker Detector

Quote Flicker Detector is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 4 settings, such as Duration minutes, Max bounce ms and Poll interval ms. MQL source code included.

Files in the download: QuoteFlickerDetector.mq4, QuoteFlickerDetector.txt.

Settings

SettingDefaultWhat it does
Duration minutes10How long to watch the feed, minutes
Max bounce ms800Max round-trip time for a bounce to count as a flicker, ms
Poll interval ms50Poll frequency for new ticks, milliseconds
Save csvtrueWrite every detected flicker to a CSV

How to install

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

Download the PDF guide

Tags: Alerts · MT4 Script · MQL4 Source Code

MQL4 & MQL5 scripts · PolyMaria