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 pour MetaTrader 4

icon

La plus grande bibliothèque comprend des codes de Expert Advisors, d'indicateurs techniques et de scripts de trading gratuits. Grâce aux applications disponibles, vous pouvez effectuer des transactions en mode automatisé et analyser la dynamique des prix. Utilisez la bibliothèque de codes pour en savoir plus sur les sentiments des marchés financiers.

Téléchargez des applications gratuites, testez-les et exécutez-les dans votre MetaTrader 4. Vous pouvez y accéder depuis la plateforme MetaTrader 4 et l'environnement de développement MetaEditor.

Soumettre votre code

This Expert Advisor implements a well-known MACD strategy made popular through a viral video. It combines MACD signals with trend and support/resistance filters.

This is a simple script file to compute lot size either using risk percentage approach or the actual amount to risk.

"Eliot Waves" EA draws 2 Trend Lines with "zigzag" on chart and trades When a Eliot retracement is formed,has Trailing Stop Loss &Take Profit works with all time frames major forex pairs and stocks NASDAQ.

"2 Moving Averages with Bollinger Bands" is a custom MT5 indicator that combines two configurable moving averages and optional Bollinger Bands. It generates real-time Buy and Sell arrows when crossovers occur, with optional alerts, sound, and email notifications. Suitable for all timeframes and symbols.

High/Low Peak Trend

Set Auto TP and SL: Automatically setting Take Profit (TP) and Stop Loss (SL) helps manage risk and lock in profits without manual intervention. This feature ensures each trade has predefined exit levels, reducing emotional decision-making and improving trading discipline. Ideal for both beginners and experienced traders, it provides consistency and protection in volatile markets.

Pending_tread EA This Expert Advisor automatically places a grid of pending orders above and below the current market price. It supports both buy and sell pending orders with user-configurable distance (in pips), lot size, and take profit levels. The EA maintains up to 10 pending orders per side, placing sell stop orders below the market and buy stop orders above, ideal for scalping strategies on any timeframe. Includes order management by MagicNumber to avoid conflicts with other EAs or manual trades.

This indicator combines two moving averages to generate buy/sell signals based on crossovers. It also plots Fibonacci retracement levels using recent swing highs and lows for support/resistance. Visual arrows mark trade signals, and optional alerts notify users in real-time. Works on all timeframes for flexible technical analysis.

SniperJaw EA is a one-trade-at-a-time robot that uses the Alligator indicator (Jaw, Teeth, Lips) to follow the trend. You can control the trade size with LotSize, choose to close trades on opposite signal with UseEntryToExit, or use TakeProfit and StopLoss in pips if set. Slippage is managed by Slippage, and trading can be turned on or off using TradeEnabled. Alligator settings like JawPeriod, JawShift, TeethPeriod, TeethShift, LipsPeriod, and LipsShift let you adjust how the indicator works.

2 Moving Averages is a custom MQL4 indicator that uses two moving averages (fast and slow) to identify potential trend changes and generate buy or sell signals based on crossover points. It enhances signal reliability by optionally integrating support and resistance levels, helping traders confirm entry and exit zones. This tool is suitable for trend-following strategies and works across multiple time frames.

Cet EA utilise l'indicateur RSI (Relative Strength Index), l'oscillateur stochastique et l'indicateur des bandes de Bollinger pour identifier les opportunités de tendance ou de contre-tendance. En tant qu'EA multi-paires, il analyse plusieurs paires de devises à la recherche de signaux. Cet EA est doté d'un grand nombre de fonctionnalités, notamment le suivi, la gestion du risque, la gestion de l'argent, le mode de restriction, et bien d'autres encore. Avec les bons paramètres, il a le potentiel de générer des profits significatifs.

Système de trading à rebond sur le canal des prix

Le script calcule la volatilité moyenne d'un symbole sur un intervalle spécifié. Les résultats du calcul sont affichés dans le commentaire.

Indique le début et la fin de trois sessions de négociation : asiatique, européenne et américaine.

Exemple de système de trading pour le croisement 2MA & CCI

Un système de trading simple sur le croisement de la 2MA et du CCI.

Modifier un ordre (position) avec la souris est le deuxième script de la série "GUO" (Graphical Order Management).

Définir un ordre en attente à l'aide de la souris est le premier script de la série "GUO" (Graphical Order Management).

TS basé sur le croisement de deux MA filtrés par les signaux CCI

Expert Advisor qui enregistre l'heure des échecs de connexion au serveur dans un fichier.

ZigZag MT4 original avec ajout d'un système automatique de fibonacci

Presque un TS classique basé sur le croisement de deux MA.

Cet Expert Advisor ouvre des transactions basées sur le croisement de deux moyennes mobiles ajustables. Vous pouvez entièrement personnaliser les périodes, le type (par exemple, EMA, SMA), et la direction (long-only, short-only, ou les deux). Il comprend des paramètres optionnels de Stop Loss, Take Profit et Trailing Stop.

A script that displays the useful information about the broker, the account and the full specifications of the instrument.

All indicators required by BBMA Strategy in a single indicator.

This indicator for Breakout Strategy. It doesn't print objects on the chart.

A powerful multi-timeframe RSI dashboard that visually displays the overbought, oversold, and neutral RSI status across 9 different timeframes — from M1 to MN1.

This MQL4 code implements an Expert Advisor (EA) that trades based on the Stochastic Oscillator and Bollinger Bands indicators across multiple timeframes (M1, M5, and M15).

Fair Value Gaps indicator or 'imbalance areas' where markets often move back to.

MetaCOT 2 CFTC ToolBox Indicators est un ensemble d'indicateurs MetaCOT 2 permettant d'accéder aux données des rapports de la CFTC. MetaCOT 2 supporte les rapports COT, Disaggregated COT, TFF et CIT et vous permet de construire des graphiques COT directement dans MetaTrader. Tous les indicateurs sont disponibles en code source et peuvent être utilisés pour construire votre propre système de trading.

Une comparaison gracieuse et élégante de "prix" à double valeur.

This Expert Advisor (EA) analyzes market movement by calculating the average pip movement per tick and the average spread over a user-defined number of ticks (MAX_TICKS). It also evaluates the average pip movement and spread over a specified time interval (CHECK_SECONDS). The EA dynamically tracks price changes and spread values, printing the results in the terminal and displaying them on the chart using the Comment() function. This helps traders gauge market volatility and spread fluctuations in real time.

This is a piece of code to add to an existing Expert advisor to track withdrawals from your account where the EA is running. It helps the user to monitor his or her withdrawals from a particular account.

RRS Tangled EA randomly selects currency symbols, lot sizes, and order types for trading. It does not rely on technical indicators or fundamental analysis. Instead, it uses a Randomness in Nature approach to open trades. With proper settings such as Take Profit, Stop Loss, Trailing, and Risk Management, this EA can generate significant profits.

This EA is a cleaned and minimized version of the RRS Randomness in Nature EA. It opens trades randomly with random currency pairs, random lot sizes, and random order types. This EA does not rely on any technical skillset such as indicators, price action, news calendar events, or candlestick patterns. It offers multiple trading strategies, risk management plans, and other customizable settings.

This EA is truly random in nature. It randomly selects currency pairs, lot sizes, and order types. This EA does not rely on any technical skillset such as indicators, price action, news calendar events, or candlestick patterns. It offers multiple trading strategies, risk management plans, and other customizable settings. Even though the EA works on randomness, it has still achieved good profits with proper risk management settings.

This is a Non-Directional Bias EA. This EA does not rely on any technical skillset such as indicators, price action, news calendar events, or candlestick patterns. It offers multiple trading strategies, risk management plans, and other customizable settings. This EA takes trades continuously and randomly, depending on the strategy you have chosen.

Normalized the Rate of Change (ROC) indicator.

Trade Assistant MetaTrader indicator — a multi-timeframe indicator that is based on three standard indicators: Stochastic oscillator, RSI (Relative Strength Index), and CCI (Commodity Channel Index). It displays current trend directions for M1, M5, M15, M30, H1, H4, D1, W1, and MN1 timeframes. When you follow such an indicator you have a clear picture of the trends across all important timeframes. It doesn't matter which timeframe you attach this indicator to. The indicator can be downloaded for MT4 and MT5.

Total Power Indicator (MetaTrader indicator) — is based on the two standard indicators — Bear Power and Bull Power. The indicator calculates how many bullish and bearish bars were there during a given look-back period and then calculates the proportional index for bears, bulls, and total (calculated as the absolute difference between bulls and bears) for the current bar. This way, we get continuous lines of the relative average bear and bull power over a period, removing the main disadvantage of the original Bear/Bull Power indicators — the lack of a long-term perspective. The original MetaTrader 4 version of Total Power Indicator was created by Daniel Fernandez of Asirikuy.com in 2011. The version for MT5 is now also available.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104