Symbol Trading Permission Probe
A strategy that trades twenty symbols usually gets tested on the two or three the developer happens to watch. The other seventeen are assumed tradeable and never actually checked - until one of them turns out to be close only, or disabled outright, and the first sign is a failed OrderSend in live trading rather than a warning beforehand. This script checks every symbol in scope against SYMBOL_TRADE_MODE, the field the server actually uses to decide whether an order is accepted: full, close only, long only, short only, or disabled. The older MarketInfo(MODE_TRADEALLOWED) boolean is printed alongside it rather than instead of it, because some brokers keep that legacy field current and others do not; where the two disagree, that disagreement is exactly the kind of thing worth seeing rather than having one silently overridden by the other. Results are sorted with every non-full symbol first, so the symbols that need attention are on screen without scrolling past a long list of ordinary ones. Account-level trading permission - the master switch, not a per-symbol one - is checked and reported separately at the top, since a symbol showing "full" is still moot if automated trading is off for the whole terminal. Notes and limitations - SYMBOL_TRADE_MODE reflects the server's current setting and can change without notice - around rollover, low liquidity windows, or a broker policy change. Treat a "full" result as true at the moment the script ran, not as a permanent guarantee. - All available scope can be slow on a broker with a very large symbol universe; InpMaxSymbols exists to bound that, at the cost of not covering the whole list in one run. - This reports whether the server will accept an order type, not whether the symbol has a usable spread, sufficient history, or an open session right now - those are separate checks. - A symbol not visible in Market Watch can still report a trade mode under All available scope; visibility and tradeability are independent fields and are both shown.
Script · MT5 · v1.0 · Free
About Symbol Trading Permission Probe
Symbol Trading Permission Probe is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 4 settings, such as Scope, Max symbols and Export csv. MQL source code included.
Files in the download: SymbolTradingPermissionProbe.ex5, SymbolTradingPermissionProbe.mq5, SymbolTradingPermissionProbe.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Scope | ScopeMarketWatch | Which symbols to probe |
| Max symbols | 500 | Cap on symbols probed |
| Export csv | false | Also write the 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 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: Alerts · MT5 Script · MQL5 Source Code