Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Twitter !
Rejoignez notre page de fans
Accédez à la CodeBase depuis votre terminal MetaTrader 5
Vous n'avez pas trouvé le bon code ? Commandez-le dans la section Freelance
Comment rédiger un Expert Advisor ou un indicateur

Bibliothèque de code source MQL4 et MQL5

icon

Vous souhaitez apprendre le langage de programmation MQL5 ou MQL4, mais vous ne savez pas par où commencer ? Divers programmes pour votre terminal MetaTrader sont disponibles ici. Téléchargez et étudiez les exemples de code publiés, développez vos propres indicateurs et Expert Advisors. Publiez vos applications dans la plus grande bibliothèque de codes MQL5 et MQL4, et elles seront disponibles dans chaque terminal MetaTrader et MetaEditor.

Vos exemples de code dans MQL4 et MQL5 seront distribués dans le monde entier, et des milliers de traders entendront parler de vous !

Soumettre votre code

EA de reprise de panier XAUUSD M15 avec espacement ATR adaptatif, validation de la structure LL/LH, filtrage dynamique du RSI, détection des krachs, filtre d'actualités et ajustement intelligent des transactions.

Crée un histogramme de volume horizontal sur une fenêtre rétrospective récente et marque le « Point of Control » (POC) et la « Value Area » à l'aide de l'algorithme standard TPO/volume d'extension de la zone de valeur — et non pas simplement le POC ± un décalage fixe. Actualisé à chaque nouvelle barre, il s'affiche sous forme de barre latérale à côté du cours.

A high-precision trend filter combining EMA dynamic momentum with ATR volatility bounds to pinpoint high-probability entries.

Dynamic Exponential Moving Average crossover Expert Advisor featuring volatility-based ATR Stop Loss/Take Profit and automatic account risk percentage position sizing.

Trend-following Expert Advisor for MetaTrader 5 combining Supertrend direction with ADX and DI confirmation. Uses an ATR-based stop loss and risks up to 0.5% of equity per trade.

Marks impulse candles: body at least ATR x multiplier, body at least a set share of the candle range, close near the extreme, optional tick volume confirmation. Green arrow below a bullish impulse, red above a bearish one. Closed bars only, no repainting. Signals are in the two buffers so an Expert Advisor can read them with iCustom.

Account level risk guard for prop firm accounts. One copy on any chart watches every position on the account, closes everything when the daily loss or maximum loss limit is hit, caps lot size and can flatten around high impact news. Logs every action to the Experts tab and a CSV.

Draggable on-chart manual trading panel with multi-timeframe bias, ATR SL/TP hints, a trailing stop and one-click BUY/SELL/CLOSE ALL.

Indicateur MT5 open source permettant d'identifier la structure confirmée du marché, les blocs d'ordres volumétriques et l'activité d'achat/vente estimée.

Il repère les plus hauts et les plus bas fractals en tant que niveaux de liquidité, puis signale la barre exacte où le cours dépasse l'un de ces niveaux avant de clôturer à nouveau à l'intérieur — un « sweep de liquidité » ou une « chasse aux stops » — à l'aide d'une flèche et d'une étiquette de prix facultative. Les vérifications de « sweep » ne s'effectuent que sur les barres clôturées, de sorte que les signaux ne sont jamais redessinés.

Marks swing highs and lows only after N closed bars have confirmed them, so a drawn swing never moves or disappears.

Turtle-style Donchian breakouts on gold, followed with three exits at once: an ATR trailing stop, the Turtle exit channel and a fixed target. Backtested on XAUUSD H1 and H4 in 2025 and 2026, where all twelve combinations were profitable. Non-repainting, with buffers for an Expert Advisor.

A Turtle-style breakout EA for gold. It buys when an H4 bar closes above the 20-bar high in an uptrend, with a 2 ATR stop and a 2R target. Backtested on XAUUSD from January 2020 to September 2026: +9,029.72 on 10,000 at 1% risk, profit factor 1.77, max drawdown 11.38%, 6 of 7 years profitable.

Finds the weekend CME gap on gold and on 24/7 Bitcoin charts, keeps every unfilled gap on the chart until price returns to it, and shows how often gaps filled, how fast, how far price ran first, and what fading them would have made. Non-repainting, with buffers for an Expert Advisor.

Un panneau d'interface graphique interactif pour MetaTrader 5, conçu pour les traders manuels et les développeurs quantitatifs. Il automatise le dimensionnement dynamique des positions en fonction d'un pourcentage précis du risque sur le capital du compte, et propose l'exécution d'ordres en un clic (Achat/Vente), un BreakEven instantané, une fonctionnalité « Fermer tout » ainsi qu'une gestion continue et en temps réel du Trailing Stop.

Cela permet au graphique MT5 de défiler comme un graphique TradingView, avec un bouton « Auto » pour réinitialiser l'affichage.

Posts your MT5 opens and closes to a Telegram chat: side, symbol, entry, stop and target in pips, lots, and on close the result, pips, R-multiple and time held. Retry queue, restart-safe, never trades. Free version of Trade Reporter Telegram and Discord.

Détecte les écarts de juste valeur (déséquilibres de prix) sur 3 bougies et les affiche sous forme de rectangles qui restent visibles en temps réel jusqu'à ce que le cours repasse à travers l'écart. La détection s'effectue uniquement sur les barres entièrement fermées ; ainsi, les écarts n'apparaissent ni ne disparaissent de manière intermittente pendant la formation de la bougie en cours.

Neural Loss-Pattern Auditor entraîne un petit réseau neuronal à propagation directe, écrit entièrement en MQL5 natif, sur l'historique des transactions clôturées afin de vérifier si les caractéristiques comportementales et liées au contexte de marché permettent de prédire quelles transactions sont les plus susceptibles d'entraîner des pertes. Il fournit une amélioration de la précision par rapport à une référence naïve, un tableau de calibrage des probabilités, un classement par permutation de l’importance des caractéristiques, ainsi qu’une note composite configurable de A à F accompagnée de recommandations. Lors de la première exécution, il utilise une démo synthétique intégrée, ce qui permet de visualiser immédiatement les résultats sans aucune configuration ; il suffit de définir l'une des entrées sur InpUseDemoData=false pour analyser à la place l'historique d'un compte réel. MQL5 pur : aucune bibliothèque externe, pas de Python et aucun service d'IA d'aucune sorte.

MQL5 port of a Pine Script ATR trailing-stop indicator: nLoss = ATR-multiple, the stop ratchets under price in an uptrend and over price in a downtrend, and flips (with a buy/sell arrow) when price closes through it. Includes a Python reference port and a parity test that checks both agree with a literal, bar-by-bar transcription of the Pine semantics (na/nz/series history).

A small demo Expert Advisor: EMA fast/slow cross entries (evaluated on closed bars only, no repainting), ATR-based stop-loss and take-profit, spread filter, and position handling that works on both hedging and netting accounts. Includes a Python reference implementation for parity testing. This is a deliverable example, not a trading recommendation - the attached equity curve is from synthetic data and shows the method, not an edge.

Time weighted average price of the running session, anchored at the cash open of Frankfurt, London, New York or Tokyo with automatic daylight saving. Every second counts the same, minutes without a tick carry the last price, and two bands show the time weighted standard deviation around the line.

Panel that samples the spread once per second and shows it in points and in the symbol's natural unit (pips on FX, index points on index CFDs), with rolling min/avg/median/max, a session statistic since server midnight, the spread as percent of ATR, a hold-time alert and an optional CSV log. It never sends an order.

Marks the Asian session range, signals when London or New York sweeps one side of it and reverses, and keeps a scorecard of how every past signal ended in R, spread included. Non-repainting, with buffers ready for an Expert Advisor.

An intraday Smart Money Concepts EA for gold. It waits for price to sweep a recent swing high or low, confirms the reversal with a close through the sweep candle's body, and trades only with the H1 trend. Backtested on XAUUSD M15 over 2025 and 2026 at 1% risk per trade.

Free risk-based position size calculator built specifically for Gold (XAUUSD). Enter your account balance, risk percentage, entry price and stop-loss price - the indicator calculates the exact lot size, risk amount, stop distance, risk/reward ratio and potential profit, and draws entry, stop and take-profit lines on the chart. Contract size is read automatically from the symbol specification, so it works on any gold symbol without manual setup.

Hull Moving Average indicator displaying four periods on a single chart, colour-coded by direction (green for rising, red for falling, grey for flat). Implemented with a ring buffer and incremental running-sum math, so memory and CPU use remain constant regardless of chart history length. Buffer layout is documented and stable, making the indicator suitable for use with iCustom() from EAs. Supports 2, 3, or 4 Hull lines depending on configuration.

Protect Your Funded Account with Institutional-Grade Risk Monitoring. The #1 reason traders fail prop firm challenges is not a bad strategy; it is breaching daily drawdown limits. The AlphaQuant Prop Firm Daily Drawdown Dashboard is a free, high-visibility Expert Advisor

A real economic-calendar news filter that also works in backtests. Export the events once with a script, then block new entries around news both live and in the Strategy Tester. Fixes the one-hour DST shift of historical calendar times.

Un panneau MetaTrader 5 gratuit et en lecture seule qui convertit la règle de réinitialisation quotidienne de votre société de trading pour compte propre (définie selon le fuseau horaire utilisé par celle-ci) en heure réelle du serveur de votre courtier, affiche un compte à rebours en temps réel jusqu'à la prochaine réinitialisation et vous avertit avant qu'un changement d'heure lié à l'heure d'été ne décale la limite d'une heure. Il n'envoie aucun ordre, ne lit aucune donnée de compte ; il s'agit uniquement d'un affichage.

Ferme un panier de positions lorsque sa perte flottante atteint une limite définie sous forme de montant fixe, de pourcentage du solde ou de pourcentage des capitaux propres. Filtrage par symbole ou numéros magiques, objectif de profit facultatif, nouvelles tentatives sécurisées sans blocage.

Educational MT5 hedging-account trade panel with risk sizing, spread protection, a persistent daily-loss lock, break-even and trailing stops.

TREND Follower (Daily) is a lightweight, development-oriented Expert Advisor (EA) created as a base trading architecture for research, learning, experimentation, and further development. The EA is intentionally designed around a simple concept: follow the market direction using the relationship between price and the Parabolic SAR. It is not presented as a fully optimized or finished trading system. Instead, it provides a clean and accessible foundation that developers can study, modify, test, and expand.

Account-wide MT5 risk protection EA for prop-firm and personal accounts. Monitors daily and overall drawdown, position losses, safety buffers, and automatically protects the account when configured limits are reached.

Un oscillateur de sous-fenêtre qui signale les barres de déplacement à faible participation comme des « vides de liquidité » et attribue une note comprise entre 0 et 100 en fonction de la rapidité avec laquelle le cours comble chacune d'entre elles, permettant ainsi de distinguer le bruit rapidement absorbé des niveaux qui continuent de jouer un rôle de véritable support ou de résistance.

Utilisation de la stratégie ORB sur le CFD AAPL

Un panneau compact intégré au graphique qui affiche simultanément la tendance du symbole actuel sur plusieurs périodes, chacune étant évaluée indépendamment à l'aide de son propre croisement de moyennes mobiles « Fast » et « Slow ». Plus besoin de changer de graphique pour vérifier « ce qui se passe sur H4 » : tout est regroupé au même endroit, avec un code couleur.

Estime l'exposant de Hurst glissant du cours à l'aide de l'analyse de la fourchette redimensionnée (R/S) et le représente sous la forme d'un oscillateur à code couleur qui indique si le marché suit actuellement une tendance, revient à la moyenne ou évolue selon un mouvement aléatoire.

Spread histogram in a sub-window with current/avg/max/min stats, cost per trade, and threshold alerts for scalpers.

Educational MT5 EA: closed-bar EMA crossover entries, ATR-based stop loss and take profit, lot size from a fixed percent of equity via OrderCalcProfit, spread filter, magic-number isolation and server return-code checks. A clean template for building risk-controlled EAs. No profit claim.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207