Watchlist Trading Readiness Preflight
A symbol that looks completely normal on the chart can still be unready to trade. History can be thin after a broker migrates a feed. The spread can be wide because the session has not opened yet. The server can have trading switched off for one specific instrument while everything else works. None of that is visible from glancing at a candle. The naive version of this check is "does the symbol have a current price." That test passes on all three of the problems above. This script instead checks four things that actually matter before a basket or a multi-symbol expert starts sending orders: enough bars loaded on the timeframe that matters, a spread inside a stated ceiling, a quote that arrived recently rather than one frozen from a closed session, and - when asked - whether the server currently allows trading on that symbol at all. Each symbol gets a plain PASS or FAIL and, on a FAIL, the specific reason or reasons, not just a single opaque flag. A symbol failing on stale quotes needs a different fix from one failing on spread, and printing both in one run means you find out once instead of after the fact. Notes and limitations - This is a one-off preflight check, not a monitor. Run it again close to the moment you intend to start trading, since spread and quote age both change by the minute. - The trade-allowed check reflects the server's current setting for that symbol and account, not a permanent property - it can flip during news embargoes or maintenance windows. - History depth is read from bars already loaded in the terminal. A symbol added to Market Watch moments ago may need a chart opened on it, or a short wait, before the full count is available. - Grading is independent per symbol; there is no cross-symbol correlation or portfolio-level check here.
Script · MT4 · v1.0 · Free
About Watchlist Trading Readiness Preflight
Watchlist Trading Readiness Preflight is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 8 settings, such as Symbol list, Timeframe and Min history bars. MQL source code included.
Files in the download: WatchlistReadinessPreflight.ex4, WatchlistReadinessPreflight.mq4, WatchlistReadinessPreflight.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Symbol list | Symbols, comma separated (blank = every Market Watch symbol) | |
| Timeframe | PERIOD_CURRENT | Timeframe the history depth is measured on |
| Min history bars | 1000 | Minimum bars of history required to pass |
| Max spread pips | 3.0 | Maximum current spread, in pips, to pass |
| Max quote age seconds | 120 | Quote older than this is graded as a dead/closed session |
| Require trade allowed | true | Fail a symbol if the server has trading disabled on it |
| Write csv | true | Also write the graded table to a CSV file |
| Delimiter | DelimiterComma | CSV column separator |
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 → Scripts.
- 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 script onto a chart to run it once.
Tags: Trading Sessions · Multi-Currency · Alerts · MT4 Script · MQL4 Source Code