Rejoignez notre page de fans
A library of 24 MQL5 classes that watches a prop-firm rulebook -- drawdown, daily loss, payout consistency, minimum trading days, news blackout -- against any account, and flattens on breach without ever opening a position of its own.
A lightweight, OOP-compliant MQL5 header class (.mqh) for accurate pip value calculation and dynamic lot sizing across all instruments, featuring automated cross-currency rate conversion and broker volume normalization.
Three position-sizing protections that do different things; confusing them is why so many accounts get wiped out: - ladder: one contract per X of balance, always applied as a CAP, even with manual lot sizing; - floor: below the minimum capital it does not trade; a new deposit is needed; - breaker: stops at X% below the peak, at any account size, and does not rearm by itself. What this library solves and almost none does: a deposit is not profit, and a withdrawal is not a loss. The breaker measures the drop against the balance peak. Untreated, a deposit made DURING a drawdown lifts balance and peak together, and the protection stops seeing the drop exactly when it would help. Here deposits and withdrawals shift the peak by the same amount. The peak is persisted to a file: a breaker that forgets the peak on a terminal restart is not a breaker. The demo simulates a deposit at the bottom of a drawdown. Run it with the deposit on and off and compare the "drop" column.
Four EAs writing to the same file, all with FILE_SHARE_READ|FILE_SHARE_WRITE, FileSeek(SEEK_END), FileWrite, FileClose. Looks correct. Every FileOpen returns success. No error in the log. And the lines vanish. Reason: FILE_SHARE_WRITE lets all four open at the same time. All four call FileSeek(SEEK_END) and get THE SAME offset, because none has written yet. All four write at the same position. Whoever closes last wins. Three lines vanish silently. In my case: 12 events expected, 8 in the file. The fix is to open EXCLUSIVELY (no FILE_SHARE_WRITE) and retry while another EA holds the file. And to shout in the log when the retries run out: a log that fails silently is worse than no log at all, because you trust it. The demo script reproduces both modes. To see the loss, drag it onto four charts at the same time with safe mode off and count the lines in the CSV. On a single chart the defect does not show up - which is why it passes in testing and breaks in production.
Detects the gold symbol whatever the broker calls it, reads the contract specification from the terminal instead of assuming it, and turns a risk in account currency into a lot size that is correct for that broker.
A daily process writes "today's decision" (which strategy runs, or FLAT) to a file the EAs read at the open. One day the writer did not run. The EAs read yesterday's file, compared its date with TimeCurrent() - the server clock, which had stepped back to the previous day overnight - saw a match, and traded all morning on a 24-hour-old decision. No error anywhere. Two rules, both in this class: 1) staleness is judged against TimeLocal(), which always moves forward; TimeCurrent() is the last tick's stamp - it freezes without ticks and can step back on reconnect. 2) When in doubt the answer is FLAT: missing file, bad date, wrong day, empty line - every failure path returns "do nothing", and each is logged ONCE per state change, not on every tick and not never. File format: line 1 = ISO date, line 2 = decision string. The demo writes a fresh, a stale, a malformed, an empty and a missing file, and shows that only the first is allowed to trade.
Four EAs on the same symbol, each one honest on its own: each checks "do I have a position?" with its own magic number, sees none, and enters. On a demo account this reached 22 contracts on a symbol meant to carry 1, and a watchdog had to close 16 positions in one morning. The cap belongs at the door, not after the fact. ExposureCap::Allowed(symbol, lots, cap) sums the volume of every open position on the symbol - all magic numbers, manual trades included - and refuses the order BEFORE it is sent when it would breach the cap. One log line with the three numbers (held, requested, cap) says why. Deliberately simple: gross exposure, no netting of longs against shorts, no per-EA quota. It is a check, not a lock: two EAs deciding on the same tick can both pass; in practice EAs on different charts decide on different ticks. The demo script prints held / cap / room for the current symbol and shows the refusal line. Nothing is traded.
Une bibliothèque permettant de récupérer des signaux de proximité pour des indicateurs basés sur les canaux
Une petite bibliothèque aux dépendances légères qui introduit dans MQL5 un type « Result » inspiré de Rust. Les fonctions renvoient un objet unique de type « valeur ou erreur » au lieu de s'appuyer sur l'état global GetLastError() ; les échecs sont ainsi explicites et impossibles à ignorer. Elle comprend ResultValue (types de valeurs) et Result (objets pointés), une structure Error, des macros de retour anticipé (TRY, RETURN_ON_ERROR, …) ainsi que des callbacks optionnels Then/Match/MapError.
Advanced MQL5 risk management class providing deterministic lot sizing, auto-suffix detection, and cross-currency triangular conversion.
MQTTFive — une implémentation complète du client MQTT 5.0 pour MQL5. Fonctionnalités : • MQTT v5.0 — tous les types de paquets, propriétés, QoS 0/1/2 • TCP + TLS via l’API native MQL5 Socket • Messages « Will » avec propriétés (will_delay_interval, payload_format, message_expiry) • Alias de sujet pour les PUBLISH sortants • Contrôle de flux (Receive Maximum) • Options d’abonnement (no_local, retain_as_published, retain_handling) • Charges utiles binaires et UTF-8 • Réessai automatique pour QoS 1/2 • Aucune dépendance DLL — MQL5 pur Testé avec Mosquitto 5.0 (15 tests, tous réussis). Documentation : https://github.com/chekh/MQTTFive Licence : MIT
Une bibliothèque MQL5 orientée objet (.mqh) qui remplace les modèles de risque statiques des particuliers par des modèles institutionnels de dimensionnement des positions ajustées à la volatilité (VAPS) et de calcul du critère de Kelly.
ASQ Order Executor — Institutional order execution wrapper for MQL5 EAs ASQ Order Executor provides institutional-grade order execution with automatic retry logic, slippage monitoring, partial fill handling, requote management, and comprehensive execution statistics. Drop it into any EA for production-ready trade execution.
Détails techniques Utilise OrderSend de MQL5 avec TRADE_ACTION_DEAL pour une fermeture instantanée du marché aux prix actuels Bid/Ask. Inclut la tolérance de glissement (10 points), la correspondance des volumes et la préservation des nombres magiques. Boucle en arrière à travers les positions pour éviter le déplacement de l'index pendant l'exécution.
Institutional-grade forex session detection and analysis library for MetaTrader 5.
Economic calendar trading guard library for MetaTrader 5 with live MQL5 Calendar API integration.
A comprehensive stop-loss and trade management module offering multiple stop-loss methods (Fixed Pips, ATR-based, Swing High/Low, and Percentage) and trailing stop options (Fixed, ATR, Step, and Breakeven). It includes automatic broker stop-level adjustment, risk-reward–based take profit calculation, and visual stop-loss lines on the chart. The code follows a clean, structured architecture with a dedicated `CStopLossManager` class, standardized enums and structures, and fully documented English comments for clarity and maintainability.
Institutional risk analysis library for MetaTrader 5. Zero external dependencies. Pure MQL5 mathematics.
Complete deep learning library in pure MQL5. Build, train and deploy neural networks natively in MetaTrader 5. No DLLs, no Python, no external APIs.
Classe d'inclusion qui valide la combinaison ping terminal + latence d'exécution avant les opérations commerciales. Renvoie un message faux si le seuil est dépassé.
A professional object-oriented MQL5 library designed for quantitative developers. It provides asynchronous order execution and dynamic slippage control to prevent terminal freezing during high-frequency algorithmic trading.
Une bibliothèque JSON conçue pour une utilisation massive des LLM et une latence réduite.
Include-file class that measures inter-tick latency, filters false alarms via a self-normalising ATR volatility gate, and broadcasts persistent lag alerts to other EAs via GlobalVariable IPC.
Si vous avez accès au code du conseiller expert, vous pouvez enregistrer des graphiques de solde et d'équité et calculer des critères d'optimisation supplémentaires en ajoutant du code additionnel à partir de cette bibliothèque.
Permettre à l'AE de déterminer s'il existe des AE en double sur le graphique en fonction des conditions.
Automates MQL5 buffer and plot index management. Eliminates manual counting, simplifies Z-order layering, and handles complex plot types (Candles, Color Lines) with a single line of code.