Broker Quiet Window Learner
Every broker has its own recurring dead spots in the feed - a rollover gap, a weekly maintenance window, a thin session with sparse ticks - and none of it is documented anywhere a program can read. A single quiet period proves nothing on its own; it could be a genuine connection problem. The same slot going quiet week after week is a pattern, and this tool exists to notice the pattern rather than the single event. It buckets time into 168 slots - one per hour of one day of the week - and on a fast poll, tracks how many seconds have passed since the last real tick. A gap crossing the configured threshold opens a "quiet episode", counted once per episode (not once per poll it lasts, so one long gap does not inflate the count), against whichever bucket it started in. Every bucket also tracks how many times it has been observed at all, so a slot that has only been checked once never gets reported as a confirmed pattern. Learning is persisted to a CSV and reloaded on restart, because this only becomes useful after days of observation - losing the count every time the terminal restarts would defeat the purpose. Notes and limitations - This learns feed behaviour for the symbol of the chart it is attached to; run one instance per symbol if different symbols go quiet at different times. - Buckets are day-of-week/hour only - a maintenance window that shifts with daylight-saving changes will show up as two adjacent buckets rather than one, until enough weeks accumulate on each side. - A genuine connection fault and a learned dead window look identical to this tool at the moment they happen; only the accumulated history across many weeks tells them apart. - State is saved periodically and on shutdown, but a hard crash between saves can lose up to 10 minutes of learning.
Expert advisor · MT5 · v1.0 · Free
About Broker Quiet Window Learner
Broker Quiet Window Learner is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 6 settings, such as Gap threshold seconds, Poll interval sec and Min observations. MQL source code included.
Files in the download: BrokerQuietWindowLearner.ex5, BrokerQuietWindowLearner.mq5, BrokerQuietWindowLearner.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Gap threshold seconds | 90 | Silence longer than this counts as one quiet episode |
| Poll interval sec | 15 | How often the elapsed silence is checked |
| Min observations | 4 | Minimum times a bucket must have been observed before it is reportable |
| Quiet ratio threshold | 0.5 | Fraction of observations that must be quiet to call a bucket a dead window |
| State file name | BrokerQuietWindowLearner_state.csv | Persisted learning state |
| Report interval min | 60 | How often the learned dead windows are printed |
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 → Scripts.
- 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 script onto a chart to run it once.
Tags: Trading Sessions · Alerts · MT5 Expert Advisor · MQL5 Source Code