Guarda come scaricare robot di trading gratuitamente
Ci trovi su Facebook!
Unisciti alla nostra fan page
Accedi al CodeBase dal tuo terminale MetaTrader 5
Non hai trovato il codice che fa per te? Ordinane uno dalla sezione Freelance
Come scrivere un Expert Advisor o un indicatore

Libreria di Codici Sorgente MQL4 e MQL5

icon

Vuoi imparare il linguaggio di programmazione MQL5 o MQL4, ma non sai da dove cominciare? Qui sono disponibili vari programmi per il tuo terminale MetaTrader. Scarica e studia questi esempi di codici pubblicati e sviluppa per conto tuo degli indicatori e degli Expert Advisor. Le tue applicazioni pubblicate nella più grande libreria di codici MQL5 e MQL4 saranno disponibili in ogni terminale MetaTrader e nel MetaEditor.

I tuoi esempi di codice in MQL4 e MQL5 saranno distribuiti in tutto il mondo, permettendoti di entrare in contatto con migliaia di trader!

Invia il tuo codice

L'indicatore individua le zone di squilibrio (Fair Value Gap) sul grafico e segnala con una freccia quando il prezzo vi ritorna. È adatto per l'oro, il Forex e qualsiasi strumento liquido su timeframe da M5 a H4.

Session Boxes is a custom indicator for MetaTrader 5 that draws color-coded rectangular boxes on the chart representing the high-low range of the Asia, London, and New York trading sessions. The indicator uses H1 data internally and supports configurable session hours in GMT along with a broker server offset parameter

Implementazione in MQL5 del metodo della differenziazione frazionaria a larghezza fissa (FFD) tratto dal libro di López de Prado *Advances in Financial Machine Learning* (Capitolo 5). Trasforma una serie di prezzi non stazionaria in una stazionaria, preservando al massimo la memoria storica; l’output viene sottoposto a validazione incrociata con la libreria Python afml con una precisione di 1e-12.

MACD indicator replicating TradingView's visual style for MT5. 4-color histogram, SMA-seeded Signal line — values match TradingView bar-for-bar.

Un motore fisico quantitativo che applica il calcolo differenziale all'andamento dei prezzi, estraendo la vera velocità di mercato (derivata prima) e l'accelerazione di mercato (derivata seconda) per prevedere l'esaurimento del trend prima che si verifichi.

This Expert Advisor combines an ADX-based trend strength filter with an EMA pullback entry technique, using ATR for dynamic stop loss and take profit sizing. It is designed for trading a single symbol with one position open at a time.

Expert Advisor for testing the Inside Bar continuation hypothesis. The EA places pending orders in the direction of the Main Bar after a valid Inside Bar pattern is detected, with optional ATR and pattern quality filters.

A state engine to provide geometric signal validation for indicator signals

Instead of having to analyze each pair individually, you can see at a glance what are the most promising pairs according to your own criteria.

Universal Breakout Study is a research-focused Expert Advisor for MetaTrader 5 designed to analyze and optimize range breakout strategies. It provides flexible parameter testing, fast optimization, and a structured framework for validating trading ideas using historical data and forward testing.

An econometric price-space indicator that utilizes the Ornstein-Uhlenbeck stochastic process to mathematically estimate the asset's true driftless equilibrium and its speed of mean reversion.

MSNR v5.31Plus AEU EA is an Expert Advisor for MetaTrader 5 based on Malaysian SNR body levels, Smart Money reaction logic, liquidity sweep, MISS, engulfing confirmation, trendline confluence, QML, CRT and DOL target projection. The EA is designed for XAUUSD and works best on the M5 timeframe. It scans higher timeframes such as W1, D1, H4 and H1 to build important support and resistance zones, then waits for price action confirmation on the execution timeframe. Main features: - Malaysian SNR body-level detection. - Higher-timeframe support and resistance scan. - Liquidity sweep, MISS and engulfing confirmation. - Trendline, QML, breakout-retest and CRT logic. - Confluence cluster system. - Session filter for Asia, Europe and US trading hours. - Risk management by account percentage. - Partial close at selected R multiple. - Break-even and safety guard options. Recommended settings: Symbol: XAUUSD Timeframe: M5.

Expert Advisor for testing the Turnaround Tuesday hypothesis. If Monday closes bullish, a Sell position is opened on Tuesday. If Monday closes bearish, a Buy position is opened. The EA supports an ATR-based filter, ATR-based Stop Loss and Take Profit levels, as well as position sizing using either a fixed lot size or percentage risk.

Breakout is a clean, automated MetaTrader 5 expert advisor designed to capture algorithmic breakout momentum in structural bull markets.

Multi-indicator EA for Gold (XAUUSD) and Silver (XAGUSD): RSI, ADX and MA signals, adaptive ATR trailing stop and built-in capital protection.

Prime Quantum AI è un Expert Advisor MT5 che combina un pre-filtro classico (ADX + Alligator) con la conferma dei grafici basata sulla visione dell'IA da parte dei principali fornitori di IA (Anthropic Claude, OpenAI GPT, Google Gemini, DeepSeek, xAI Grok). Quando il pre-filtro rileva un'impostazione di tendenza, l'EA acquisisce tre schermate di grafici con timeframe adattivo e le invia al fornitore di IA configurato, che restituisce direzione, fiducia, stop-loss e take-profit. L'operazione viene aperta solo quando l'IA conferma con sufficiente sicurezza il segnale del pre-filtro. Caratteristiche: doppia modalità di rischio Standard Broker / Prop Firm, dimensionamento del lotto configurabile, martingala opzionale, modalità SL/TP multiple, trailing stop, chiusura parziale, filtri news/ora/giorno/spread, pannello informativo trascinabile sul grafico e parametri dell'indicatore completamente esposti. Richiede MetaTrader 5, WebRequest abilitato per l'URL del provider e una chiave API valida. Il provider viene rilevato automaticamente dal formato della chiave.

A quantitative stochastic probability engine that utilizes Markov Chain transition matrices to mathematically forecast the percentage chance of bullish or bearish continuation on the next algorithmic execution cycle.

Dynamic Fair Value Gap (FVG) is an MQL5 indicator for MetaTrader 5 that automatically detects market price imbalances. This indicator is perfectly suited for traders utilizing the Smart Money Concepts (SMC) strategy.

IMR is a multi-layered quantitative reversal finder designed for discretionary price-action traders who refuse to trade blind. It helps traders understand what's the current market regime. Whether its an accumulation, distribution or continuation.

Un motore di elaborazione del segnale digitale (DSP) che applica la trasformata discreta di Fourier (DFT) ai dati di mercato, isolando la frequenza ciclica dominante per prevedere i punti di svolta ed eliminare il phase-lag.

L'indicatore Supertrend traccia una linea di tendenza dinamica basata sull'ATR sul grafico MetaTrader 5, passando da una linea verde di rialzo a una linea rossa di ribasso con segnali opzionali di acquisto/vendita a freccia ad ogni inversione di tendenza.

Displays the current bid-ask spread in points and pips directly on the chart, with live tracking of session minimum, maximum and average spread since the indicator was attached. Color changes to alert when spread exceeds a user-defined threshold.

Educational MT5 chart utility that monitors XAUUSD spread on the chart and alerts when spread rises above user-defined warning or danger levels.

Educational MT5 chart panel for XAUUSD showing live spread, ATR volatility, EMA trend bias, RSI condition, daily range and active trading session.

Script to set Stop Loss on every open position based on a target loss in the account's currency (e.g. $50 per position). Works on any deposit currency and any forex symbol. Validates broker stops/freeze levels. Currency conversion handled automatically.

Diagnostic script that compares SYMBOL_TRADE_TICK_VALUE, SYMBOL_TRADE_TICK_VALUE_LOSS and SYMBOL_TRADE_TICK_VALUE_PROFIT for every symbol in Market Watch. Classifies each symbol into one of four categories (ALL_EQUAL, TV_MATCHES_PROFIT, TV_MATCHES_LOSS, ALL_DIFFER) and provides an aggregated summary plus interpretation tip. Useful for verifying which tick-value property to rely on when implementing risk-based lot sizing in EAs. Exports full per-symbol report to CSV in MQL5/Files.

Heiken ashi with all buffers set as series

Daily Risk Monitor Lite è un indicatore leggero per MetaTrader 5 che visualizza il P/L realizzato giornalmente, il P/L fluttuante, il totale giornaliero, il drawdown corrente e lo stato del rischio basato sui colori direttamente sul grafico. È uno strumento di monitoraggio di sola lettura e non chiude le operazioni né blocca il trading.

Triple-barrier labeling pipelines frequently use an arbitrary constant (0.5–1.0%) or a legacy spread assumption as the min_ret threshold. A threshold set below the actual round-trip transaction cost causes the pipeline to label cost-driven noise as tradeable signal. The labeled dataset then systematically overstates edge, and any model trained on those labels overfits to an artifact of the labeling scheme rather than to genuine market structure. TransactionCostCollector.mq5 is a standalone script that resolves the data-collection step of this problem.

Allows to monitor spread and swaps!

Questo EA implementa una strategia di trading con breakout del range. Calcola un intervallo di prezzi tra gli orari di inizio e fine definiti dall'utente, disegna un rettangolo visivo sul grafico per segnare il massimo e il minimo di tale intervallo, quindi monitora l'azione dei prezzi dopo la chiusura dell'intervallo. Se il mercato rompe al di sopra del massimo dell'intervallo, apre un'operazione di acquisto; se rompe al di sotto del minimo dell'intervallo, apre un'operazione di vendita.

A quantitative volume density engine utilizing weighted Harmonic Mean mathematics to eliminate arithmetic outliers and map the true institutional liquidity center of gravity.

Un approccio ispirato all'apprendimento automatico per i regimi di tendenza. Fornisce segnali accurati e fiducia nei backtest incorporati

Close Profit Positions

A library to retrieve proximity signals for channel based indicators

Due medie mobili adattive che interpretano il mercato in modo diverso. I crossover segnalano i cambiamenti di tendenza.

MACD Multi-color Histogram

This custom indicator displays the ADX Wilder, +DI, and -DI lines together with Bollinger Bands calculated on the ADX main line in a separate window. It helps traders evaluate both trend strength and the volatility range of ADX values. The middle, upper, and lower bands can be used to identify ADX expansion, contraction, and potential strength breakouts. The indicator is useful for confirming trending conditions, spotting increasing momentum, and detecting when ADX moves outside its normal range. Input parameters allow adjustment of the ADX period, Bollinger Bands period, deviation, and applied price settings.

Si tratta di un motore predittivo quantitativo che sostituisce l'ATR (Average True Range) nel settore retail, ormai superato; utilizza il modello econometrico GARCH(1,1), vincitore del Premio Nobel, per prevedere matematicamente la volatilità e la varianza future del mercato.

Long-term momentum and trend oscillator based on dual TRIX and LWMA filtering.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199