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

This indicator is essentially a GPS based on envelope as channel gauging and weather radar for the market wrapped into one. Instead of just giving you a bunch of lines to guess at, it calculates the mathematical "stretch" of the market and combines it with a multi-timeframe trend analysis to tell you exactly where you are. if price is outside band it is some fundamental shift in momentum happening if you are on wrong side then quit and stay away or go with trend on pull backs

Questo indicatore mostra il valore smussato del trend lineare

Dynamic approach vastly outperforms relying on a single MA.

Educational MT5 Expert Advisor using completed-candle EMA 9/21 alignment and RSI 14 filtering, with fixed-lot execution and a compact black-and-gold dashboard.

1. The Core Tracking Engine (Alpha-Beta Filter)At its core, the indicator utilizes an Alpha-Beta filter—a lightweight, steady-state version of a Kalman filter designed to track position and velocity.Predictive Calculation: Instead of simply averaging past prices like an SMA or EMA, the engine calculates a predicted price based on current velocity ($v$).Error Correction:

Questo Expert Advisor combina un filtro di forza del trend basato sull'ADX con una tecnica di ingresso sui pullback basata sull'EMA, utilizzando l'ATR per il calcolo dinamico delle dimensioni dello stop loss e del take profit. È progettato per il trading su un singolo simbolo con una sola posizione aperta alla volta.

Variable Configurations to TestScalper Setup: Try an $\alpha$ of 0.45 and a $\beta$ of 0.12. The dashboard cells will flash changes rapidly, reacting instantly to short-term pullbacks.Swing Configuration: Lower the values to an $\alpha$ of 0.15 and a $\beta$ of 0.02. The matrix cells will stabilize, ignoring intraday market noise and preserving a clear view of macroscopic trends.

A multi currency multi symbols super trend dashboard

A read-only MT5 dashboard for risk-based lot sizing, account health, broker volume limits and current symbol exposure.

Super trend with basket TP and SL management

Expert Advisor per verificare l'ipotesi di continuazione basata sull'Inside Bar. L'EA inserisce ordini in sospeso nella direzione della Main Bar dopo aver rilevato un pattern Inside Bar valido, con filtri opzionali basati sull'ATR e sulla qualità del pattern.

A babysitting trade management tool and system :D

Invece di dover analizzare ogni coppia singolarmente, puoi vedere a colpo d'occhio quali sono le coppie più promettenti in base ai tuoi criteri.

Un motore di sistema per la convalida geometrica dei segnali indicatori

The Apex of Algorithmic Grid & Kinetic Momentum. Welcome to the KCI Native Matrix Engine—a merciless, mathematically driven algorithmic behemoth built natively for MetaTrader 5. Engineered for High-Frequency Trading (HFT) environments, this EA strips away bloated standard libraries and operates directly at the server routing level.

The KCI-Directional Matrix (KCI-DX) is an advanced, physics-inspired analytical tool that extracts market kinematics by measuring price path length and volatility energy. Unlike conventional momentum tools, KCI-DX employs a dynamic Z-Score normalization combined with a Sigmoid activation function. This ensures the output is flawlessly bounded between 0 and 100, providing hyper-responsive trend strength identification and directional bias without distortion from historical extremes.

The KCI Volatility Distance is an advanced, adaptive algorithm meticulously engineered to map market momentum and trend direction with pure precision. Utilizing a proprietary matrix-based calculation, this tool dynamically filters out market noise and provides a strictly quantitative perspective on directional strength. Built with a highly optimized Object-Oriented Programming (OOP) core, it is designed for both visual trading clarity and seamless integration into Expert Advisors or Machine Learning modules, ensuring ultra-light CPU performance across multiple assets.

A multi strategy EA gold mine :)

Breakouts based on envelope channel or band, multi EA logic in One EA

A local client to client trade copier with custom dashboard in C# and transport pipe in golang , complete src is provided in archive ( socket based ver ) ultra low latency

This indicator is a trend-momentum oscillator that tracks where price sits relative to its structural volatility channel using a normalized relationship between the Parabolic SAR and Envelopes.

P/L Calendar — Monthly Profit & Loss at a Glance. P/L Calendar shows you, day by day, exactly how your account performed this month — so you can spot your best and worst days, track your win rate, and see your trading rhythm without digging through the terminal's history tab.

Universal Breakout Study è un Expert Advisor per MetaTrader 5 incentrato sulla ricerca, progettato per analizzare e ottimizzare le strategie di breakout da range. Offre test flessibili dei parametri, ottimizzazione rapida e un quadro strutturato per la convalida delle idee di trading utilizzando dati storici e test prospettici.

Chart Navigator MT5 Light — una mini-mappa che consente di spostarsi rapidamente sul grafico dei prezzi e di passare in un attimo ai propri punti di riferimento su di esso

Un indicatore econometrico dello spazio dei prezzi che utilizza il processo stocastico di Ornstein-Uhlenbeck per stimare matematicamente il vero equilibrio senza deriva dell'asset e la sua velocità di ritorno alla media.

This Expert Advisor monitors the Stochastic oscillator to automatically close positions based on user-selected conditions: crossovers above overbought or below oversold, entry into overbought/oversold zones, or exit from those zones. Positions are filtered for closure by profit state (loss, profit, or both). An optional Test Mode enables basic entry signals when the %D line crosses configurable offset levels around the midline (50).

Expert Advisor per verificare l'ipotesi del "Turnaround Tuesday". Se il lunedì chiude al rialzo, martedì viene aperta una posizione di vendita. Se il lunedì chiude al ribasso, viene aperta una posizione di acquisto. L'EA supporta un filtro basato sull'ATR, livelli di Stop Loss e Take Profit basati sull'ATR, nonché il dimensionamento delle posizioni tramite lotto fisso o percentuale di rischio.

MSNR v5.31Plus AEU EA è un Expert Advisor per MetaTrader 5 basato sui livelli SNR malesi, sulla logica di reazione dello “Smart Money”, sullo “sweep” di liquidità, sul MISS, sulla conferma delle candele engulfing, sulla confluenza delle linee di tendenza, sul QML, sul CRT e sulla proiezione degli obiettivi DOL. L’EA è progettato per la coppia XAUUSD e funziona al meglio sul timeframe M5. Esegue una scansione dei timeframe superiori, quali W1, D1, H4 e H1, per individuare importanti zone di supporto e resistenza, quindi attende la conferma dell’andamento dei prezzi sul timeframe di esecuzione. Caratteristiche principali: - Rilevamento dei livelli SNR malesi. - Scansione di supporti e resistenze su timeframe superiori. - Analisi della liquidità, MISS e conferma dell’engulfing. - Logica basata su linee di tendenza, QML, breakout-retest e CRT. - Sistema di cluster di confluenza. - Filtro di sessione per gli orari di trading in Asia, Europa e Stati Uniti. - Gestione del rischio in percentuale sul conto. - Chiusura parziale a un multiplo R selezionato. - Opzioni di break-even e safety guard. Impostazioni consigliate: Simbolo: XAUUSD Intervallo di tempo: M5.

BBandsPsar is a custom hybrid indicator that fuses Bollinger Bands’ volatility framework with the Parabolic SAR’s trend-following logic. By integrating these two methodologies, it effectively reconciles market volatility with emerging trend dynamics within a single, cohesive tool.

A pure-MQL5 script that measures how robust a strategy's edge is to execution costs. It reads a Date,Profit,Volume CSV of closing deals and models each deal's cost as a fixed part plus a per-lot part. It prints the breakeven cost per deal, the cushion (the multiple of an assumed realistic cost at which the net profit reaches zero), the net profit and profit factor re-priced at the assumed cost, the share of winners the cost turns into losers, and a composite A+ to F cost-robustness score with recommendations. If no file is present it generates a reproducible sample and analyzes it, so the output is visible on the first run. No external libraries, no Python, no AI.

EA multi-indicatore per l'oro (XAUUSD) e l'argento (XAGUSD): segnali RSI, ADX e MA, trailing stop ATR adattivo e protezione del capitale integrata.

Breakout è un expert advisor per MetaTrader 5, semplice e automatizzato, progettato per cogliere lo slancio algoritmico dei breakout nei mercati rialzisti strutturali.

The KCI Embedded Sniper is an algorithmic trading solution designed for high-precision reversal entries. Unlike conventional Expert Advisors that rely on external indicator dependencies (which often suffer from thread desynchronization and latency), this EA features a fully embedded Kinetic Compression Index (KCI) engine. By transplanting the entire mathematical framework of the KCI—calculating Velocity Quotients, Kinetic Displacement, Energy Dispersion, and Phase Velocity—directly into the EA’s core logic, we have eliminated "asynchronous lag." The result is a lightning-fast sniper engine that validates market exhaustion (Singularity) and momentum extremes (Williams %R) with micro-second precision, operating solely on completed bars to ensure zero-repaint performance.

The Kinetic Compression Index (KCI) is a custom oscillator designed to detect market exhaustion and localized compression events. By calculating its kinematic metrics internally rather than relying on external standard indicator handles, the KCI reduces overhead and simplifies buffer management for Expert Advisor (EA) integration. This article details the mathematical foundation, system architecture, buffer mapping, and practical integration guides for developers looking to implement this tool in MetaTrader 5.

SMC/ICT market-structure indicator for MT5: swing highs/lows, BOS (continuation) and CHoCH (reversal) confirmed on close, Order Blocks, Fair Value Gaps, and QML (Quasimodo) levels. Every feature is toggle-able, with adjustable swing sensitivity and colors. Works on any symbol and timeframe.

Exports your closed positions for a configurable period to a CSV file for journal analysis in Excel or Google Sheets: entry and exit time and price (volume-weighted over partial fills), volume, result in points, commission, swap, net profit and trade duration.

Calculates the correct lot size for a planned trade from your risk (percent of equity or a fixed money amount) and stop-loss distance (points or a price level). Respects the symbol's contract specification - tick size and value, volume min/max/step - and estimates the required margin.

On-chart panel with the live spread of the chart symbol - current, minimum, average and maximum since attach - color-coded against your warning and danger thresholds, plus an optional alert when the spread stays at the danger level for N consecutive seconds (news and rollover spikes).

A read-only on-chart panel that tracks your account against a daily-loss limit and a max-drawdown limit, with color-coded OK / WARNING / DANGER status. Monitoring only - it does not place, modify or close any orders.

MQTTFive — implementazione completa del client MQTT 5.0 per MQL5. Funzionalità: • MQTT v5.0 — tutti i tipi di pacchetti, proprietà, QoS 0/1/2 • TCP + TLS tramite l’API nativa MQL5 Socket • Messaggi Will con proprietà (will_delay_interval, payload_format, message_expiry) • Alias degli argomenti per i PUBLISH in uscita • Controllo del flusso (Receive Maximum) • Opzioni di sottoscrizione (no_local, retain_as_published, retain_handling) • Payload binari e UTF-8 • Riprova automatica per QoS 1/2 • Zero dipendenze DLL — MQL5 puro Testato con Mosquitto 5.0 (15 test, tutti superati). Documentazione: https://github.com/chekh/MQTTFive Licenza: MIT

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201