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

Les meilleurs codes sources MQL4 et MQL5 selon les notes des utilisateurs - 206

Soumettre votre code

Professional open-source Drawdown Monitor for MetaTrader 5. Monitors balance, equity, floating P/L, current drawdown, daily performance, peak equity and maximum drawdown with configurable risk levels.

Professional open-source Daily Profit and Loss Monitor for MetaTrader 5. Tracks daily closed profit, losses, floating P/L, win rate, daily return and configurable profit targets and loss limits.

Professional open-source Trade Statistics Dashboard for MetaTrader 5. Analyzes trading history with win rate, profit factor, reward/risk, streaks, BUY/SELL performance, lot statistics and floating P/L.

Professional open-source Symbol Information Dashboard for MetaTrader 5. Displays live prices, spread, tick value, contract size, lot limits, swaps, trading conditions, daily range and ATR in real time.

Professional open-source Drawdown Monitor for MetaTrader 5. Tracks current, daily and peak-equity drawdown, floating P/L, margin levels and configurable account risk conditions in real time.

Professional open-source Market Volatility Monitor for MetaTrader 5. Analyzes current ATR, average ATR, ATR ratio, daily range and spread to classify market volatility in real time.

Professional open-source Multi-Timeframe Trend Dashboard for MetaTrader 5. Analyzes M1 to D1 using EMA 20, EMA 50 and price position to identify Bullish, Bearish and Neutral market conditions.

Professional open-source Multi-Timeframe RSI Dashboard for MetaTrader 5. Analyzes RSI across M1, M5, M15, M30, H1, H4 and D1 to monitor momentum, overbought and oversold conditions in real time.

Cet EA pour MT5 est un outil de diagnostic qui n'effectue pas de transactions, mais recueille et affiche les caractéristiques techniques du courtier et de l'environnement de trading. Le code est structuré en 4 blocs principaux : Collecte de données (CollectAll) : extrait des informations sur le compte (effet de levier, devise), sur le symbole (nombre de chiffres, spread, swap, volumes, niveaux de stop), la latence (ping) et le fuseau horaire (différence serveur-UTC). Calcule le swap en devise réelle. Échantillonnage (OnTick) : met à jour en temps réel les statistiques sur le spread (minimum, moyenne, maximum). Sortie : imprime les données dans le journal « Experts », les enregistre dans un fichier CSV et les affiche sur un panneau graphique sur le graphique (UpdatePanel). Aides : des fonctions telles que CalcSwapInCurrency et diverses fonctions *ToStr convertissent les données numériques brutes du courtier en chaînes de caractères lisibles.

A two-stage adaptive moving average (base average + secondary smoothing) that colors itself by slope and marks price/average crossovers with arrows.

Quantitative MT5 indicator measuring execution friction relative to ATR using spread, commission and slippage assumptions.

Read-only MT5 script that estimates stop-distance cash loss in account currency, reserves explicit cash costs and floors volume to the broker grid. It never sends or modifies an order.

Channel Breakout Dashboard is an informational panel (not an automated trading robot) that runs on the MetaTrader 5 chart and centralizes, in one place, several market conditions that would otherwise require 4-5 separate indicators open at the same time.

News Trading Dashboard est un panneau d'information intégré au graphique (il n'effectue pas de transactions automatiquement) qui surveille la volatilité du marché en temps réel afin de détecter les moments de « pic lié à l'actualité » — ces fluctuations soudaines des cours qui surviennent lors de la publication de données économiques (NFP, IPC, décisions sur les taux d'intérêt, etc.).

Le « Day Trader Dashboard » est un panneau visuel de type Bloomberg pour MetaTrader 5 qui suit une fourchette de cours intrajournalière et signale lorsque le cours se trouve à l'intérieur de celle-ci (zone de consolidation) ou qu'il en est sorti. Il ne passe pas d'ordres : il s'agit d'un outil d'aide à la décision qui calcule la fourchette haut/bas à partir des barres récentes, trace ces niveaux directement sur le graphique et affiche un état en temps réel (analyse en cours / dans la fourchette / sortie de fourchette) dans un panneau thématique à mise à l'échelle automatique. Il prend en charge plusieurs instances indépendantes sur un même graphique, propose plusieurs thèmes de couleurs et supprime 100 % de ses objets lorsqu’il est désactivé.

Il s'agit d'un panneau de terminal de type « FX Dashboard » sur le graphique MT5, ainsi que de lignes tracées sur le graphique (EMA, Bollinger, Donchian).

Reverse RSI Bands is a leading indicator that mathematically reverse-engineers the RSI formula. It plots precise target price bands directly on the main chart, showing exactly at what price the RSI will hit your specified overbought or oversold levels in real-time.

Trend filter based on a constant-velocity Kalman estimator, with process noise dynamically adapting to volatility (ATR), and trend coloring according to the estimated velocity.

A clear MT5 market structure indicator that labels confirmed HH, HL, LH and LL swings directly on the chart.

An MT5 fair value gap scanner that marks bullish and bearish imbalances and tracks when each zone is filled.

A broker time session map for MT5 that displays Asia, London and New York ranges with their confirmed highs and lows.

A small educational Expert Advisor showing how a classic Donchian breakout can be applied directly to completed Renko bricks.

A Shannon-entropy oscillator that measures how ordered or disordered recent price action is, using ATR-adaptive discretization. Low values signal trending conditions, high values signal choppy/random markets — useful as a trend-filter companion for directional indicators.

Draws Sydney, Tokyo, London and New York as high/low boxes with the London-New York overlap outlined and the rollover hour shaded. Session times in GMT, broker offset detected automatically, average range of the last N sessions on every label, optional alert at session open.

A lightweight memory meter dashboard that reveals current MT5 memory usage and key resource statistics directly on the chart.

Closed-bar ICT/SMC session-liquidity scanner for three symbols, with confirmed MSS, FVG retests, risk/reward projections and optional macro context.

Measures, hour by hour, how far a symbol travels and how much of that the spread takes away. Built for gold, works on any symbol, compares several side by side.

TimeCurrent() is not a clock. It is the stamp of the LAST TICK. Two consequences break robots in production: 1. It freezes. With no tick it does not move: illiquid instrument, end of session, unstable connection - and any rule based on it stops with it. 2. It steps backwards: on a symbol switch, a reconnection or a tick from another instrument, the value can go back. The case that cost me a whole protection: I compared the date of a daily decision with TimeCurrent() to reject an expired one. The server clock stepped back to the previous day, the comparison matched, and four EAs accepted YESTERDAY's decision as valid. The gate that should have failed closed failed open - without a single error in the log. Rule: TimeLocal() for timestamps, dates, day changes, expiry - all that must always move forward; TimeCurrent() for session hours and market data. The script measures the divergence in your environment and reports both symptoms live. Run it with the market closed.

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.

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.

Drag your stop loss where you actually want it, hit Buy or Sell, and the lot size is already correct — no calculator, no spreadsheet. Handles break-even, trailing, and shuts trading down for the day if you hit your loss limit.

AurumNeuro Vanguard is an intelligent Expert Advisor (EA) specifically designed for XAUUSD / Gold trading, combining a hybrid Neural Risk Architecture with the Unified Market Dynamics Engine (UMDE).

A compact educational indicator for MetaTrader 5 that renders classic fixed-size Renko bricks on a single CCanvas bitmap layer and overlays Bollinger Bands calculated directly from completed Renko closes. The horizontal axis represents Renko sequence rather than time. The internal Renko builder uses incoming BID ticks and the classic two-brick reversal rule. Bollinger Bands are calculated only from completed Renko bricks; the forming brick is never used in the band calculation.

1...199200201202203204205206