Broker Basket Preflight: Read-Only Diagnostics for Multi-Symbol Broker Configurations
Info
The Broker Basket Preflight: Read-Only Diagnostics for Multi-Symbol Broker Configurations is a Script for MetaTrader 5 that broker basket preflightan original standalone metatrader 5 script for checking a broker's multi-symbol configuration before developing or testing a portfolio ea. It reads exact symbols already selected in Market Watch and writes a diagnostic report to the Experts journal.
Usage
This tool is typically used for enhancing chart analysis and decision making.
Platform
This Script works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Scripts folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use Broker Basket Preflight: Read-Only Diagnostics for Multi-Symbol Broker Configurations
1. Installation: Move your script file into the MQL/Scripts directory and restart the platform.
2. Execution: Drag the script onto a chart; it will perform a one-time action, such as closing all open orders or clearing chart objects.
3. Editing: Use MetaEditor (F4) to modify code, click "Compile," and verify no errors appear in the terminal before running.
4. Removing: Scripts stop automatically, but you can remove them manually by right-clicking the chart and choosing "Remove Script."
Frequently Asked Questions
Q: How are scripts different from EAs? A: Scripts execute a single action and then stop; EAs monitor the market and trade continuously.
Q: Can I assign a hotkey to a script? A: Yes, right-click the script in the Navigator, select "Set Hotkey," and define your preferred keyboard shortcut.
Q: Why did my script stop? A: Scripts are designed to stop immediately after finishing their programmed command; this is normal behavior.
What this tool does
Broker Basket PreflightAn original standalone MetaTrader 5 script for checking a broker's multi-symbol configuration before developing or testing a portfolio EA.
Typical Use Case
This Script excels in automated trading and technical analysis on MetaTrader 5.
Compatible Platform & Setup
This Script works on MetaTrader 5. Place the file in the MQL5/Scripts folder and restart the terminal.
Description & Settings
Related: Accurate Gold Trading: Identifying Broker Symbols and Sizing Positions - another powerful script for MetaTrader 5 traders.
Broker Basket PreflightAlso recommended: Broker Execution Diagnostics: Understanding Symbol Specifications - similar script with strong performance on MetaTrader 5.
An original standalone MetaTrader 5 script for checking a broker's multi-symbol configuration before developing or testing a portfolio EA. It reads exact symbols already selected in Market Watch and writes a diagnostic report to the Experts journal. The MQ5 source includes the MIT license and requires no external library, DLL or network request.
Installation guide:
The attached START-HERE.txt explains installation, all three inputs and units, journal labels and a recorded test summary in English and French.
Usage
Copy BrokerBasketPreflight.mq5 to MQL5/Scripts, open it in MetaEditor and compile with F7.
Select each exact broker symbol in Market Watch and allow bid/ask quotes to arrive. Prefixes and suffixes are not guessed.
Run the script on a separate chart. Leave InpSymbols empty for that chart's symbol, or enter a comma-separated basket using your broker's exact names.
Read the SPEC, QUOTE, CALC, WARN, SKIP and SUMMARY lines in the Experts journal. Correct any name, data or specification issue and rerun.
Inputs
InpSymbols
— empty by default; otherwise one to 64 comma-separated entries. Names are trimmed. Unknown, unselected, empty and duplicate entries are skipped independently so later valid entries can still be inspected.
InpMaxQuoteAgeSeconds
— default 120. Warns when the last quote is older than this threshold; 0 disables the stale-quote age threshold.
InpMaxSpreadPoints
— default 0, meaning disabled. An optional spread warning threshold in the broker's points, not pips or account currency.
Outputs
The report shows contract size, minimum/maximum/step volume, aggregate directional volume limit, point, tradable tick size, digits, stops/freeze distances, calculation and trading modes, execution mode and reported market-order filling policies. It checks volume and price grids, synchronization, quote time and spread. These fields follow the MQL5 symbol properties; the current bid/ask is read with SymbolInfoTick.
For valid, grid-aligned quotes and minimum volume, the script estimates isolated BUY and SELL margin, the result of an upward and downward one-tick price move for each side, and the immediate spread-only result for each side. Amounts are labelled in the account currency.
OrderCalcMargin and OrderCalcProfit failures are reported as warnings; an unavailable result is never substituted with a fabricated zero. Stale-quote calculations are identified as historical.
Limitations
The script submits no orders and manages no positions. It does not call APIs to change chart settings, Market Watch selections or terminal global variables. It reports no account identifier, balance or position list. Output is journal text only.
Margin estimates ignore current positions and pending orders and are not an available-margin check. Price-move and spread calculations exclude commission, swap and slippage. The script does not validate daily history, indicator signals or trading-session opening times. A clean report does not prove that funds are sufficient or that the broker will accept an order. Custom symbols, stale quotes and missing currency-conversion data require separate review.
Validation
Verified on 7 October 2026: the standalone script compiled in MetaEditor with 0 errors and 0 warnings. An isolated MT5 Strategy Tester smoke test called the same diagnostic through a test-only EA wrapper on US500 with a simulated USD account. It inspected one valid symbol, skipped four invalid/duplicate/empty entries, and produced two margin estimates and six profit probes with zero warnings. Eighteen deterministic helper checks also passed. The wrapper is not part of this submission. This is a software smoke test, not validation of every broker, symbol or account currency.
Français — guide complet
Broker Basket Preflight est un script MetaTrader 5 autonome en lecture seule pour vérifier la configuration d'un courtier avant de développer ou tester un EA multi-symboles. Il lit les noms exacts déjà sélectionnés dans Market Watch et écrit dans le journal Experts. Le source MQ5 contient la licence MIT ; aucune bibliothèque externe, DLL ou requête réseau n'est nécessaire.
Installation et utilisation
Dans MT5, ouvrez Fichier > Ouvrir le dossier des données. Copiez BrokerBasketPreflight.mq5 dans MQL5/Scripts.
Ouvrez le fichier dans MetaEditor et compilez avec F7. Revenez dans MT5 ; actualisez Navigateur > Scripts si nécessaire.
Sélectionnez les noms exacts du courtier dans Market Watch et attendez les cotations bid/ask. Les préfixes et suffixes ne sont pas devinés.
Lancez le script sur un graphique séparé. InpSymbols vide utilise le symbole du graphique ; sinon, saisissez les noms du panier séparés par des virgules.
Lisez l'onglet Experts de la Boîte à outils. Le script s'exécute une seule fois. Corrigez les problèmes signalés, puis relancez-le.
Paramètres et unités
InpSymbols
: vide par défaut ; sinon, de 1 à 64 entrées séparées par des virgules. Les espaces autour des noms sont retirés. Les entrées inconnues, non sélectionnées, vides ou répétées sont ignorées individuellement ; les entrées valides suivantes peuvent être inspectées.
InpMaxQuoteAgeSeconds
: 120 secondes par défaut. Avertit si la dernière cotation dépasse ce seuil ; 0 désactive le seuil d'ancienneté.
InpMaxSpreadPoints
: 0 par défaut, donc désactivé. Le seuil facultatif d'avertissement s'exprime en points du courtier, pas en pips ni dans la devise du compte.
Lire les six catégories du journal
SPEC
: caractéristiques du contrat, volumes minimal/maximal et leur pas, limite directionnelle, point, tick négociable, décimales, distances stops/freeze et modes de calcul, négociation, exécution et remplissage.
QUOTE
: bid, ask, spread en points et heure de la cotation.
CALC
: au volume minimal valide et avec des cotations alignées sur la grille de prix, marge isolée BUY/SELL, résultat d'une variation d'un tick vers le haut et le bas pour chaque sens, et résultat immédiat lié au seul spread. Les montants sont indiqués dans la devise du compte.
WARN
: condition à examiner ou calcul indisponible. Les échecs de OrderCalcMargin et OrderCalcProfit sont signalés ; un résultat indisponible n'est pas remplacé par un zéro inventé. Les calculs sur des cotations anciennes sont identifiés comme historiques.
SKIP
: entrée ignorée, par exemple un nom inconnu, non sélectionné, vide ou répété.
SUMMARY
: nombres de symboles inspectés, d'entrées ignorées et d'avertissements.
Limites
Aucun ordre n'est envoyé et aucune position n'est gérée. Le script n'appelle aucune API pour modifier les graphiques, la sélection Market Watch ou les variables globales du terminal. Aucun identifiant de compte, solde ou liste de positions n'est affiché. La sortie est uniquement du texte dans le journal.
Les estimations de marge ignorent les positions et ordres en attente existants ; elles ne contrôlent pas la marge disponible. Commissions, swaps et slippage sont exclus des calculs de variation de prix et de spread. Le script ne valide ni l'historique quotidien, ni les signaux d'indicateurs, ni les horaires d'ouverture des séances. Un rapport sans avertissement ne garantit ni des fonds suffisants ni l'acceptation d'un ordre. Les symboles personnalisés, cotations anciennes et données de conversion manquantes nécessitent un examen séparé.
Validation technique
Vérifié le 7 octobre 2026 : compilation du script autonome dans MetaEditor avec 0 erreur et 0 avertissement. Un test de fonctionnement dans le testeur MT5 isolé a appelé le même diagnostic via un EA réservé au test, sur US500 avec un compte USD simulé. Il a inspecté 1 symbole valide, ignoré 4 entrées invalides, répétées ou vides, et produit 2 estimations de marge et 6 calculs de résultat, avec 0 avertissement. Les 18 contrôles déterministes des fonctions auxiliaires ont également réussi. L'EA de test ne fait pas partie de cette contribution. Ce test de fonctionnement ne valide pas tous les courtiers, symboles ou devises de compte.
You may also like: Spread Audit: Analyzing Broker Spreads with M1 Historical Data - excellent alternative for script users on MetaTrader 5.
Source Code
#property copyright "RobotFX"
#property version "1.00"
#property description "This code is educational. Feel free to use, modify and upgrade as you wish. Visit ROBOTFX.ORG for professional trading tools"
#property strict
#property script_show_inputs
input string InpSymbols = "";
input uint InpMaxQuoteAgeSeconds = 120;
input double InpMaxSpreadPoints = 0.0;
struct BrokerSpec
{
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.