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

Opening Range Breakout EA template with built-in account protection. Marks the high and low of the first N minutes after the session open and places OCO stop orders above and below the range. Includes risk-based position sizing, daily loss limit, maximum drawdown limit, ATR range filter, trade direction filter, and protection against positions carried overnight. All session times are configurable inputs. Educational template, not a profit-guaranteed system. Test on demo before any live use.

Détecte les blocs d'ordre — la dernière bougie opposée précédant un mouvement impulsif qui rompt la structure du marché — et les représente sous forme de zones qui s'étendent en temps réel jusqu'à ce que le cours revienne et les neutralise. Les ruptures de structure et leur neutralisation sont toutes deux évaluées uniquement sur les barres clôturées ; ainsi, aucun tracé n'est modifié a posteriori.

Affiche les propriétés qui font qu'un même EA se comporte différemment chez un autre courtier : horaires de trading, taille du contrat, valeur du tick, statistiques sur les spreads, coût des swaps et couverture des sessions en temps réel. En lecture seule, n'effectue aucune opération de trading.

Exports closed trades to CSV with Maximum Adverse Excursion (MAE) and Maximum Favorable Excursion (MFE) in points and money, calculated from M1 history, plus the percentage of the available move each trade captured.

Opens charts for all Market Watch symbols or a custom symbol list in one click, on any timeframe, with an optional template applied to each chart. Skips charts that are already open and limits how many are opened at once.

Shades the chart background by volatility regime (Compression, Normal, Expansion) based on the percentile rank of the current ATR. Shows the current regime on the chart, alerts on regime changes and exposes buffers for Expert Advisors.

Shades the chart background by volatility regime (Compression, Normal, Expansion) based on the percentile rank of the current ATR. Shows the current regime on the chart, alerts on regime changes and exposes buffers for Expert Advisors.

Draws Asian, London and New York session range boxes and marks liquidity sweeps: a closed bar that wicks beyond a completed session's high or low and closes back inside. Non-repainting arrows, extended session levels, alerts and iCustom-ready buffers.

Writes a CSV journal of every trade with the exit reason, and a report that shows how far each trade ran, in R. It never trades.

ICT killzones for MetaTrader 5: Asia, London and New York sessions drawn in New York time with automatic daylight-saving conversion, session highs and lows carried forward until price takes them, previous day, week and month levels, opening prices and time markers. One file, no DLL.

Arixis Market Regime Map is a non-repainting MT5 indicator that classifies market conditions as Trend Up, Trend Down, Range or Transition using price efficiency, normalized slope, volatility, market structure and multi-horizon agreement.

Resamples your closed trades 10,000 times to show whether your average trade is an edge or could still be luck: the 95% range of the average and the chance it is below zero.

Shows the day's result against the daily and max loss limits of a prop firm account, with a warning alert, in a panel on the chart.

The Market Behavior Analyzer is a practical indicator designed to make market structure easier to read directly from the chart. It identifies significant swing points, classifies them as Higher Highs, Higher Lows, Lower Highs, and Lower Lows, and tracks the movement between them in pips. It also provides a Market Story panel and an interactive Swing Inspector for examining impulses, pullbacks, retracements, swing duration, and the developing market structure.

Un indicateur MT5 permettant de visualiser clairement la structure du marché, qui identifie directement sur le graphique les pics et creux confirmés (HH, HL, LH et LL).

Un graphique des sessions boursières pour MT5 qui affiche les fourchettes de cours de l'Asie, de Londres et de New York, ainsi que leurs plus hauts et plus bas confirmés.

Un outil d'analyse des écarts de juste valeur sur MT5 qui signale les déséquilibres haussiers et baissiers et suit le moment où chaque zone est comblée.

Un indicateur M5 à barres fermées combinant la structure du marché, les balayages de liquidité, les indicateurs BOS/CHoCH et le momentum pour afficher les points d'entrée, le stop-loss (SL), le take-profit 1 (TP1) et le take-profit 2 (TP2), avec des signaux à fréquence de marché de détail et un historique des paramètres configurables accessible par clic.

Audits the bar history your terminal actually holds, which is the history every backtest and every indicator reads. Six checks per symbol: impossible OHLC values, broken bar times, bars missing while the broker's own session table says it was quoting, empty and flat bars, bars that disagree with the broker's own M1 series, and spread sanity. The headline figure is session coverage, not a grid percentage that mostly measures how many weekends you audited. Every finding goes to CSV with its bar time, and the audited bars plus the session table can be dumped so the whole report can be recounted by something other than this tool.

Gold EA that trades both directions: when the stochastic signal line turns, it places a stop order at yesterday's high or low, filtered by a Bollinger band. Self-contained, no custom indicators. Backtest on XAUUSD H1, July 2021 to September 2026: +245% on a 1,000 USD deposit at a fixed 0.01 lot, 23.9% maximum equity drawdown.

Calculates position size and daily / max loss limits for prop firm accounts and shows them in a panel on the chart.

Gestion des ordres, des ordres existants, des ordres à cours limité, des ordres suiveurs, du seuil de rentabilité et du calculateur de taille de lot, le tout dans un seul outil

Un petit Expert Advisor pédagogique pour MetaTrader 5 présentant une méthode simple pour combiner des « briques » Renko classiques de taille fixe avec un indicateur de tendance de type SuperTrend.

A port of the Olsen group's Alpha Engine: eight limit-order agents trade intrinsic-time directional changes on a hedging account. They add on overshoots and trim at a profit on reversals.

Mirrors trades opened, modified, and closed by another EA on the same hedging account, selected by magic number. By default it inverts direction (Buy↔Sell, SL↔TP), so you can forward-test the reverse of a strategy with real spreads, slippage, and execution.

A free open-source MT5 utility for analyzing historical trading performance beyond Profit Factor.

Un calculateur de risque MT5 glissable qui convertit la distance d'entrée et la distance de stop sélectionnées en une taille de position normalisée par le courtier, en utilisant la taille du tick, la valeur du tick et le risque du compte.

Indicateur MT5 gratuit qui trace automatiquement les niveaux de Fibonacci sur plusieurs périodes et met en évidence les zones de confluence, la structure du marché, les zones de prime/décote et les réactions clés des cours.

Shows where stops are likely resting and which ones were just taken. Liquidity pools = confirmed swing highs and lows that price has not traded through yet, equal highs/lows (a bigger pool) and yesterday's high and low. When a bar trades beyond a pool it is marked as swept, and as "grabbed & rejected" if the same bar closes back inside. Non-repainting: a swing is used only after N closed bars on each side. The panel is a neon city drawn on a CCanvas: the price is a flying car, sell stops are towers below it, buy stops floating platforms above it, yesterday's levels golden billboards, a searchlight sweeps the sky and a ticker runs today's catch. Two buffers give the nearest active pool above and below for use in an Expert Advisor. Indicator only: it never trades.

Measures whether an indicator repaints instead of trusting the claim. It re-reads the buffers of any custom indicator on bars that have already closed and counts every value that changes, appears or disappears, with the furthest shift back at which that still happens. Verdict per buffer on a chart panel, every event written to CSV.

Tests whether live closing deals still match the backtest of an Expert Advisor. A bootstrap-calibrated CUSUM detector raises an alarm and estimates when the drift began, a two-window check separates a short dip from a lasting decline, and an expectancy decomposition shows whether the win rate or the trade sizes changed. The script generates demonstration data on the first run and is written in pure MQL5.

A free, fully open EA: buy GBPJPY every Monday at 11:00 server time (04:00 New York), close at 23:00. Stays profitable in backtest with the entry anywhere from 09:00 to 13:00. Attach to GBPJPY M1.

Quickly view each and every individual market's open and close times. Very important for short term scalping. I own the copyright, if anyone modifies or uses this it must stay free. Comments and feedback welcome.

Calcule une enveloppe de Nadaraya-Watson sans rafraîchissement à l'aide d'un lissage gaussien et signale par des flèches les passages des cours au-delà des bandes supérieure et inférieure.

Un indicateur graphique MT5 léger qui affiche en temps réel les caractéristiques de négociation d'un courtier et d'un symbole, notamment le spread, la taille du tick, la valeur du tick, les limites de volume, le niveau de stop et le niveau de gel.

Shows the real spread for each server hour, measured from your broker's own tick history: median and 90th percentile per hour, optional cost as a share of your stop and per lot, and CSV export.

A chart panel that shows the contract specification details that decide position size and trading cost (point value, spread cost, margin, swap, execution rules) in the account currency, warns about broker settings that silently break lot-size code, and exports the audit of every Market Watch symbol to CSV.

Détecte automatiquement les points de pivot des fluctuations et affiche un décompte des vagues d'Elliott validé selon les règles (impulsion 1-2-3-4-5 et correction A-B-C) directement sur le graphique, avec un panneau d'informations sur les niveaux de Fibonacci. À titre indicatif uniquement ; veillez à toujours vérifier manuellement.

Indique le début et la fin de trois séances de bourse au maximum (Asie, Londres, New York ou toute autre période personnalisée) à l'aide de séparateurs verticaux et/ou de zones ombrées, qui se répètent quotidiennement sur une fenêtre glissante couvrant les données récentes. Il s'agit d'un affichage purement visuel : pas de calculs, pas de signaux, juste des délimitations claires entre les séances.

H1 indicator that combines support/resistance confluence from H4, D1 and W1 with EMA trend alignment and candlestick confirmation. Shows non-repainting BUY/SELL arrows with ATR-based stop and reward/risk filtering.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208