Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Facebook !
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

This indicator is essentially a GPS based on envelope as channel gauging and weather radar for the market wrapped into one. Instead of just giving you a bunch of lines to guess at, it calculates the mathematical "stretch" of the market and combines it with a multi-timeframe trend analysis to tell you exactly where you are. if price is outside band it is some fundamental shift in momentum happening if you are on wrong side then quit and stay away or go with trend on pull backs

Indicateur MACD reproduisant le style visuel de TradingView pour MT5. Histogramme à 4 couleurs, ligne de signal basée sur la moyenne mobile simple (SMA) — les valeurs correspondent barre par barre à celles de TradingView.

Cet indicateur affiche la valeur lissée de la tendance linéaire

Dynamic approach vastly outperforms relying on a single MA.

Educational MT5 Expert Advisor using completed-candle EMA 9/21 alignment and RSI 14 filtering, with fixed-lot execution and a compact black-and-gold dashboard.

1. The Core Tracking Engine (Alpha-Beta Filter)At its core, the indicator utilizes an Alpha-Beta filter—a lightweight, steady-state version of a Kalman filter designed to track position and velocity.Predictive Calculation: Instead of simply averaging past prices like an SMA or EMA, the engine calculates a predicted price based on current velocity ($v$).Error Correction:

Cet Expert Advisor associe un filtre de force de tendance basé sur l'ADX à une technique d'entrée sur rebond utilisant la moyenne mobile exponentielle (EMA), tout en s'appuyant sur l'ATR pour le calcul dynamique des niveaux de stop loss et de take profit. Il est conçu pour le trading d'un seul symbole, avec une seule position ouverte à la fois.

Variable Configurations to TestScalper Setup: Try an $\alpha$ of 0.45 and a $\beta$ of 0.12. The dashboard cells will flash changes rapidly, reacting instantly to short-term pullbacks.Swing Configuration: Lower the values to an $\alpha$ of 0.15 and a $\beta$ of 0.02. The matrix cells will stabilize, ignoring intraday market noise and preserving a clear view of macroscopic trends.

A multi currency multi symbols super trend dashboard

A read-only MT5 dashboard for risk-based lot sizing, account health, broker volume limits and current symbol exposure.

Super trend with basket TP and SL management

Expert Advisor permettant de tester l'hypothèse de continuation liée à la figure « Inside Bar ». L'EA place des ordres en attente dans le sens de la « Main Bar » après avoir détecté une figure « Inside Bar » valide, avec des filtres optionnels basés sur l'ATR et la qualité de la figure.

A babysitting trade management tool and system :D

Au lieu de devoir analyser chaque paire individuellement, vous pouvez voir d'un seul coup d'œil quelles sont les paires les plus prometteuses selon vos propres critères.

Un moteur d'états permettant la validation géométrique des signaux indicateurs

The Apex of Algorithmic Grid & Kinetic Momentum. Welcome to the KCI Native Matrix Engine—a merciless, mathematically driven algorithmic behemoth built natively for MetaTrader 5. Engineered for High-Frequency Trading (HFT) environments, this EA strips away bloated standard libraries and operates directly at the server routing level.

The KCI-Directional Matrix (KCI-DX) is an advanced, physics-inspired analytical tool that extracts market kinematics by measuring price path length and volatility energy. Unlike conventional momentum tools, KCI-DX employs a dynamic Z-Score normalization combined with a Sigmoid activation function. This ensures the output is flawlessly bounded between 0 and 100, providing hyper-responsive trend strength identification and directional bias without distortion from historical extremes.

The KCI Volatility Distance is an advanced, adaptive algorithm meticulously engineered to map market momentum and trend direction with pure precision. Utilizing a proprietary matrix-based calculation, this tool dynamically filters out market noise and provides a strictly quantitative perspective on directional strength. Built with a highly optimized Object-Oriented Programming (OOP) core, it is designed for both visual trading clarity and seamless integration into Expert Advisors or Machine Learning modules, ensuring ultra-light CPU performance across multiple assets.

A multi strategy EA gold mine :)

Breakouts based on envelope channel or band, multi EA logic in One EA

A local client to client trade copier with custom dashboard in C# and transport pipe in golang , complete src is provided in archive ( socket based ver ) ultra low latency

This indicator is a trend-momentum oscillator that tracks where price sits relative to its structural volatility channel using a normalized relationship between the Parabolic SAR and Envelopes.

P/L Calendar — Monthly Profit & Loss at a Glance. P/L Calendar shows you, day by day, exactly how your account performed this month — so you can spot your best and worst days, track your win rate, and see your trading rhythm without digging through the terminal's history tab.

Universal Breakout Study est un Expert Advisor pour MetaTrader 5 axé sur la recherche, conçu pour analyser et optimiser les stratégies de cassure de range. Il offre des tests de paramètres flexibles, une optimisation rapide et un cadre structuré permettant de valider des idées de trading à l'aide de données historiques et de tests prospectifs.

Chart Navigator MT5 Light — une mini-carte permettant de se déplacer rapidement sur le graphique des cours et d'accéder instantanément à vos repères sur celui-ci

Un indicateur économétrique de l'espace des prix qui utilise le processus stochastique d'Ornstein-Uhlenbeck pour estimer mathématiquement l'équilibre réel sans dérive de l'actif et sa vitesse de retour à la moyenne.

This Expert Advisor monitors the Stochastic oscillator to automatically close positions based on user-selected conditions: crossovers above overbought or below oversold, entry into overbought/oversold zones, or exit from those zones. Positions are filtered for closure by profit state (loss, profit, or both). An optional Test Mode enables basic entry signals when the %D line crosses configurable offset levels around the midline (50).

Expert Advisor permettant de tester l'hypothèse du « Turnaround Tuesday ». Si le marché clôture en hausse le lundi, une position de vente est ouverte le mardi. Si le marché clôture en baisse le lundi, une position d'achat est ouverte. L'EA prend en charge un filtre basé sur l'ATR, des niveaux de Stop Loss et de Take Profit basés sur l'ATR, ainsi que le dimensionnement des positions à l'aide d'une taille de lot fixe ou d'un pourcentage de risque.

MSNR v5.31Plus AEU EA est un Expert Advisor pour MetaTrader 5 basé sur les niveaux SNR malaisiens, la logique de réaction du « Smart Money », le balayage de liquidité, le MISS, la confirmation par engulfing, la confluence des lignes de tendance, le QML, le CRT et la projection d’objectifs DOL. Cet EA est conçu pour la paire XAUUSD et fonctionne de manière optimale sur la période M5. Il analyse les périodes supérieures telles que W1, D1, H4 et H1 afin de définir des zones de support et de résistance importantes, puis attend la confirmation de l’évolution des cours sur la période d’exécution. Caractéristiques principales : - Détection des niveaux SNR malaisiens. - Analyse des supports et résistances sur les périodes supérieures. - Balayage de liquidité, MISS et confirmation par engulfing. - Logique des lignes de tendance, QML, cassure-retest et CRT. - Système de clusters de confluence. - Filtre de session pour les heures de trading en Asie, en Europe et aux États-Unis. - Gestion des risques par pourcentage du compte. - Clôture partielle à un multiple R sélectionné. - Options de seuil de rentabilité et de sécurité. Paramètres recommandés : Symbole : XAUUSD Période : M5.

BBandsPsar is a custom hybrid indicator that fuses Bollinger Bands’ volatility framework with the Parabolic SAR’s trend-following logic. By integrating these two methodologies, it effectively reconciles market volatility with emerging trend dynamics within a single, cohesive tool.

A pure-MQL5 script that measures how robust a strategy's edge is to execution costs. It reads a Date,Profit,Volume CSV of closing deals and models each deal's cost as a fixed part plus a per-lot part. It prints the breakeven cost per deal, the cushion (the multiple of an assumed realistic cost at which the net profit reaches zero), the net profit and profit factor re-priced at the assumed cost, the share of winners the cost turns into losers, and a composite A+ to F cost-robustness score with recommendations. If no file is present it generates a reproducible sample and analyzes it, so the output is visible on the first run. No external libraries, no Python, no AI.

EA multi-indicateurs pour l'or (XAUUSD) et l'argent (XAGUSD) : signaux RSI, ADX et MA, stop suiveur ATR adaptatif et protection du capital intégrée.

Breakout est un expert advisor MetaTrader 5 épuré et automatisé, conçu pour exploiter la dynamique algorithmique des cassures dans les marchés haussiers structurels.

The KCI Embedded Sniper is an algorithmic trading solution designed for high-precision reversal entries. Unlike conventional Expert Advisors that rely on external indicator dependencies (which often suffer from thread desynchronization and latency), this EA features a fully embedded Kinetic Compression Index (KCI) engine. By transplanting the entire mathematical framework of the KCI—calculating Velocity Quotients, Kinetic Displacement, Energy Dispersion, and Phase Velocity—directly into the EA’s core logic, we have eliminated "asynchronous lag." The result is a lightning-fast sniper engine that validates market exhaustion (Singularity) and momentum extremes (Williams %R) with micro-second precision, operating solely on completed bars to ensure zero-repaint performance.

The Kinetic Compression Index (KCI) is a custom oscillator designed to detect market exhaustion and localized compression events. By calculating its kinematic metrics internally rather than relying on external standard indicator handles, the KCI reduces overhead and simplifies buffer management for Expert Advisor (EA) integration. This article details the mathematical foundation, system architecture, buffer mapping, and practical integration guides for developers looking to implement this tool in MetaTrader 5.

SMC/ICT market-structure indicator for MT5: swing highs/lows, BOS (continuation) and CHoCH (reversal) confirmed on close, Order Blocks, Fair Value Gaps, and QML (Quasimodo) levels. Every feature is toggle-able, with adjustable swing sensitivity and colors. Works on any symbol and timeframe.

Exports your closed positions for a configurable period to a CSV file for journal analysis in Excel or Google Sheets: entry and exit time and price (volume-weighted over partial fills), volume, result in points, commission, swap, net profit and trade duration.

Calculates the correct lot size for a planned trade from your risk (percent of equity or a fixed money amount) and stop-loss distance (points or a price level). Respects the symbol's contract specification - tick size and value, volume min/max/step - and estimates the required margin.

On-chart panel with the live spread of the chart symbol - current, minimum, average and maximum since attach - color-coded against your warning and danger thresholds, plus an optional alert when the spread stays at the danger level for N consecutive seconds (news and rollover spikes).

A read-only on-chart panel that tracks your account against a daily-loss limit and a max-drawdown limit, with color-coded OK / WARNING / DANGER status. Monitoring only - it does not place, modify or close any orders.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200