Guarda come scaricare robot di trading gratuitamente
Ci trovi su Telegram!
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

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.

Rileva i blocchi di ordine — l'ultima candela opposta prima di un movimento impulsivo che rompe la struttura di mercato — e li traccia come zone che si estendono in tempo reale fino a quando il prezzo non ritorna e le mitiga. Sia le rotture della struttura che la mitigazione vengono valutate solo sulle barre chiuse, quindi non vi è alcun ripaint.

Stampa le proprietà dei simboli che fanno sì che lo stesso EA si comporti in modo diverso su un altro broker: orari di trading, dimensione del contratto, valore del tick, statistiche sullo spread, costo dello swap e copertura delle sessioni reali. Solo lettura, non effettua operazioni di 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 indicatore chiaro per la struttura di mercato su MT5 che evidenzia direttamente sul grafico le oscillazioni confermate di HH, HL, LH e LL.

Un grafico delle sessioni di trading per MT5 che mostra gli intervalli di prezzo relativi ai mercati asiatici, londinesi e newyorkesi con i rispettivi massimi e minimi confermati.

Uno scanner MT5 per il gap di fair value che evidenzia gli squilibri rialzisti e ribassisti e tiene traccia di quando ciascuna zona viene colmata.

Un indicatore M5 a barra chiusa che combina struttura di mercato, analisi della liquidità, BOS/CHoCH e momentum per visualizzare punti di ingresso, SL, TP1 e TP2, con segnali a frequenza retail e cronologia delle impostazioni cliccabile.

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.

Gestione degli ordini, degli ordini esistenti, degli ordini con limite di prezzo, degli ordini trailing, del break-even e del calcolatore della dimensione del lotto in un unico strumento

Un piccolo Expert Advisor didattico per MetaTrader 5 che illustra un modo semplice per combinare i classici mattoncini Renko a dimensione fissa con uno stato di tendenza in stile 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 calcolatore di rischio MT5 trascinabile che converte la distanza di entrata e lo stop selezionati in una dimensione della posizione normalizzata dal broker, utilizzando la dimensione del tick, il valore del tick e il rischio del conto.

Indicatore MT5 gratuito che traccia automaticamente i livelli di Fibonacci su più intervalli di tempo ed evidenzia le zone di confluenza, la struttura di mercato, le aree di premio/sconto e le reazioni chiave dei prezzi.

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.

Calcola un inviluppo di Nadaraya-Watson senza aggiornamento in tempo reale utilizzando la smussatura gaussiana e contrassegna con delle frecce i punti in cui il prezzo supera le bande superiore e inferiore.

Un indicatore leggero per i grafici MT5 che mostra in tempo reale le specifiche di trading relative al broker e al simbolo, tra cui spread, dimensione del tick, valore del tick, limiti di volume, livello di stop e livello di congelamento.

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.

Rileva automaticamente i punti di svolta e contrassegna sul grafico un conteggio delle onde di Elliott convalidato in base alle regole (impulso 1-2-3-4-5 e correzione A-B-C), con un pannello informativo sui livelli di Fibonacci. A titolo puramente indicativo: confermare sempre manualmente.

Indica l'inizio e la fine di un massimo di tre sessioni di negoziazione (asiatica, londinese, newyorkese o qualsiasi intervallo personalizzato) tramite separatori verticali e/o riquadri con sfondo ombreggiato, ripetuti quotidianamente su un intervallo di dati recenti a scorrimento. È una funzione puramente visiva: nessun calcolo, nessun segnale, solo confini chiari delle sessioni.

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