Requote Pattern Profiler
MQL4 has no API that reveals another trader's or another program's requote history - the only honest sample any EA can build is its own. This EA sends small probe orders on a timer, deliberately requesting a tight slippage tolerance (InpSlippagePips), because a tight tolerance is exactly what invites a requote and makes it a measurable event rather than something the broker quietly absorbs. Every probe attempt is recorded into one of 48 buckets: 24 hours of day, split into a "normal" and a "high volatility" band based on whether the current spread is running above InpHighVolSpreadRatio times its own recent average. A bucket only starts publishing an avoid flag once it clears InpMinSamplesBeforeTrust attempts - an hour with two probes and one requote would otherwise misreport a 50% requote rate that is really just noise from a tiny sample. Once trusted, each bucket publishes RPP_Avoid_<symbol>_<hour>_<band> as a terminal global variable (1.0 = avoid, 0.0 = fine), which a discretionary trader or another EA's execution logic can read before deciding when to place real orders - the actual "scheduling around requotes" this project is named for happens outside this EA, driven by data it measured rather than a guessed rule like "avoid the news". Standalone probing can be turned off (InpStandaloneMode = false) to run purely as a passive log of whatever real trading activity already happens under this chart, though the probe is what generates the bulk of the sample volume in practice. Notes and limitations - Standalone mode genuinely sends real market orders (tiny ones, by default) purely to measure requote behaviour - understand InpProbeLots and InpProbeIntervalMinutes before enabling it on a live account. - A freshly attached chart has no samples for any bucket, so nothing is flagged "avoid" until enough probes accumulate, which can take hours or days at the default interval. - Requote statistics are specific to THIS symbol, THIS broker, and the tight InpSlippagePips setting used to generate them - they are not a general statement about the broker's behaviour under looser tolerances. - Global variables persist across restarts but are shared across every chart of that symbol on this terminal.
Expert advisor · MT4 · v1.0 · Free
About Requote Pattern Profiler
Requote Pattern Profiler is an expert advisor (trading robot) for MetaTrader 4. It has 14 settings, such as Standalone mode, Probe lots and Probe interval minutes. MQL source code included.
Files in the download: RequotePatternProfiler.ex4, RequotePatternProfiler.mq4, RequotePatternProfiler.txt.
Trading robots can lose money. Check every setting and test on a demo account before using real funds.
Settings
| Setting | Default | What it does |
|---|---|---|
| Standalone mode | true | true = sends its own probe orders; false = passive log only |
| Probe lots | 0.01 | Lot size for each probe order |
| Probe interval minutes | 15 | Minutes between probe attempts |
| Close probe immediately | true | Close a filled probe right after it opens |
| Magic number | 20260901 | Magic number for probe orders |
| Slippage pips | 1 | Slippage tolerance requested on the probe (tight, to invite requotes) |
| Max retries | 3 | Attempts per probe action before giving up |
| Retry wait ms | 400 | Pause between attempts, milliseconds |
| Spread lookback | 200 | Ticks used to build the "normal spread" baseline |
| High vol spread ratio | 1.5 | Current spread / average spread above this = "high volatility" bucket |
| Min samples before trust | 10 | Requote-rate samples an hour bucket needs before it is trusted |
| Avoid threshold pct | 20.0 | Requote rate (%) at/above which an hour is flagged "avoid" |
| Publish global variables | true | Publish RPP_Avoid_<symbol>_<hour> flags |
| Timer interval sec | 5 | Panel refresh / scheduling tick, independent of price ticks |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Experts.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
- Test it first on a demo account or in the Strategy Tester.
Tags: MT4 Expert Advisor · MQL4 Source Code