Hide Untradeable Symbols
Market Watch lists tend to grow forever and shrink never - a symbol added for one backtest, one client request, or one curious look stays forever because nobody circles back to remove it. Meanwhile the server quietly disables trading on some instruments, or a symbol stops quoting entirely, and none of that shows up unless you scroll through and check each one by hand. This script does that check for every symbol in Market Watch in one pass and removes the ones that fail it. Two independent checks apply: whether the server currently allows trading on the symbol, and whether it is quoting a live Bid or Ask at all. Either one failing is enough to flag a symbol for removal. The one case this deliberately never touches is a symbol with an open position or a pending order on it. MQL4 has no separate "close only" flag the way MQL5 does, so a symbol that has gone untradeable for new business but still needs to be watched until an existing position is closed is protected outright, regardless of what the trade-allowed or quote checks say. Removing it from Market Watch would not close anything - it would just make an open position harder to see. A dry run mode lists exactly what would be removed and why, without touching Market Watch, useful for checking the list before committing to the cleanup. Notes and limitations - MQL4 cannot distinguish "close only" from fully disabled the way MQL5's SYMBOL_TRADE_MODE does; this submission treats both platforms alike by only removing on MQL5 when the symbol is fully SYMBOL_TRADE_MODE_DISABLED, not merely close-only. The open-position guard exists specifically to cover the case a fuller check would otherwise catch unsafely. - Removal is a Market Watch change only, not a broker action - a removed symbol can always be added back manually, and this script never modifies server-side symbol permissions. - The trade-allowed and live-quote checks both reflect the current moment. A symbol quiet over a weekend can look identical to one genuinely disabled; re-run during active market hours for the cleanest result.
Script · MT4 · v1.0 · Free
About Hide Untradeable Symbols
Hide Untradeable Symbols is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 5 settings, such as Remove trade disabled, Remove quote free and Keep if open position. MQL source code included.
Files in the download: HideUntradeableSymbols.ex4, HideUntradeableSymbols.mq4, HideUntradeableSymbols.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Remove trade disabled | true | Remove symbols the server currently flags as not tradeable |
| Remove quote free | true | Remove symbols with no live Bid/Ask at all |
| Keep if open position | true | Never remove a symbol with an open position or pending order |
| Keep current chart | true | Never remove the symbol this script is running on |
| Dry run | false | List what would be removed without actually removing it |
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: Alerts · MT4 Script · MQL4 Source Code