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!
Consenti l'uso dei cookie per accedere al sito MQL5.com.
Abilita le impostazioni necessarie nel browser, altrimenti non sarà possibile accedere.
Hai effettuato l'accesso. L'autenticazione a due fattori è stata disattivata. Configurala di nuovo e scansiona un nuovo codice QR, oppure continua con l'autenticazione a due fattori disattivata.
Attiva l'autenticazione a due fattori ContinuaThe probe prints the values a symbol specification supplies: digits, point, trade tick size, trade tick value, contract size, volume minimum, volume maximum, volume step and the stops level. Trade tick size is the smallest price change the instrument can make, trade tick value is the money one tick is worth for one lot, and the stops level is the minimum distance in points the reference gives for a stop away from the current price. It then prices a stop at the volume you enter, taking the pip as ten points on a 3- or 5-digit symbol and one point on every other symbol: the pip count times the pip gives a price distance, the distance over the trade tick size gives ticks, and ticks times trade tick value times volume gives the money.
Trend-following breakout EA using a Gaussian-filtered channel, ATR bands, risk-based lot sizing, and an R-multiple trailing stop.
This utility displays a compact information panel on the chart for the current and previous candle: Range, Body, Body/Range ratio, ATR(period) and Range/ATR expansion. Each metric has its own color for instant reading (like moving averages), with bullish/bearish direction highlighted by colored tags. Values are shown in pips on forex symbols (3 or 5 digits) and in points on other instruments. Panel position, width, font sizes, ATR period and all colors are fully configurable via inputs. The panel updates on every tick — no background timer. Part of the "Patience Pays" toolkit by Marll85. /it/users/serghei_istrati
Monitoraggio in tempo reale del buffer di drawdown giornaliero e indicatore esatto della linea di prezzo di superamento della soglia per i conti delle società di trading proprietario. Include la ricostruzione della cronologia delle operazioni alle 00:00 (ora del server) (comprese le commissioni di apertura), il blocco dell’istantanea dell’HWM alle 00:00, la calibrazione a due fasi dei tassi incrociati di OrderCalcProfit e buffer di dati iCustom() per gli Expert Advisor.
Differenze di fair value non ridisegnate sulle barre chiuse, con stati di zona (attiva, toccata, mitigata) e buffer iCustom per gli EA.
Manual one-click trading panel for MetaTrader 5. Calculates the lot size from your risk % and stop loss (always rounded down), places SL/TP by pips and reward:risk, and manages trades with breakeven, trailing stop and Close All (only its own trades). Shows balance, equity, spread, floating P/L and an Asia / London / New York session tracker. No trading strategy inside: trades open only when you click BUY or SELL.
Monitora l'intero conto e chiude tutte le posizioni prima che venga superato il limite giornaliero di perdita o di drawdown massimo, quindi mantiene il conto inattivo fino al termine del blocco. Non effettua operazioni di trading.
Scopri il leverage effettivo di ogni simbolo di Market Watch, comprese le fasce di margine variabile, con swap, commissioni e spread in tempo reale in un unico pannello.
Zero-DLL on-chart execution monitor tracking genuine tick-only Min/Avg/Max spread, Spread-to-ATR ratio, decoded broker swap modes, 3x rollover day, and 1.0-lot all-in cost.
Zero-DLL intraday session box indicator (Asia, London, New York) with 14-day Average Daily Range exhaustion tracking and dynamic ADR Upper/Lower target lines.
JPN225 Yen Check is a free, fully open EA for the Nikkei 225 on M30. It buys when the Nikkei is holding near the top of its recent range, but only if it hasn't run too far ahead of GBPJPY. Everything is closed by 17:00 server time. Four conditions, long only, one trade at a time, a stop loss on every trade.
Zero-DLL on-chart HUD that calculates ATR-based Stop-Loss/Take-Profit distances and broker-normalized lot sizes across 3 configurable risk tiers.
Donchian channel breakout Expert Advisor with EMA trend filter, ATR stop, ATR trailing stop, break-even and position size from risk % of balance.
A library for MetaTrader 5 that declares rules between the inputs of an Expert Advisor once in the code. OnInit rejects a combination that breaks a rule, with the reason in the Journal; before an optimization starts, OnTesterInit estimates which share of its passes the rules would reject and warns above a limit you set.
Protects prop firm challenge and funded accounts: watches equity in real time and closes all trades before the daily loss or maximum loss limit is broken, with an optional profit target lock and a live progress panel.
Puts the contract specification of the chart symbol on one sheet, including the money value of one point and the margin for one lot.
Structural Swing Migration BUY is an educational Expert Advisor for MetaTrader 5 that opens BUY positions when confirmed swing highs and swing lows move upward together. It evaluates closed M15 candles and combines structural confirmation with a volatility threshold and a bullish candle filter.
One include file that encrypts texts and bytes so only a program with the same key can read them. A wrong key or a changed message is refused instead of read as garbage, keys can come from a password, and the code is checked against the official NIST and RFC test vectors.
Traccia l'intervallo di apertura di una sessione configurabile (ora di inizio e durata in minuti, con un adeguamento al fuso orario del server), i livelli 1R e 2R al di sopra e al di sotto del box e il VWAP della sessione (volume per tick o volume reale, se fornito dal broker). Un piccolo pannello conta, nelle ultime N sessioni concluse, quante hanno superato l’intervallo solo al rialzo, solo al ribasso, su entrambi i lati o per niente, e con quale frequenza il prezzo ha raggiunto 1R e 2R dopo la prima rottura. Le statistiche sono conteggi storici: descrivono il passato e non prevedono nulla. Vengono utilizzate solo le barre chiuse, quindi non vi è alcun repaint; avvisi opzionali (popup, notifiche push e sonori) si attivano una volta per direzione per sessione quando una barra chiusa si chiude al di fuori del box. È possibile leggere otto buffer (intervallo, obiettivi, VWAP, stato di rottura) da un Expert Advisor tramite iCustom(). Funziona su timeframe da M1 a M30, ricalcola solo le nuove barre ed elimina i propri oggetti dal grafico quando viene rimosso. Solo lettura: non effettua mai operazioni di trading. Nessuna DLL, nessuna richiesta web.
Traccia i massimi e i minimi del giorno precedente, della settimana precedente e del mese precedente, oltre ai livelli automatici arrotondati intorno al prezzo corrente. Ogni livello è accompagnato da un’etichetta che indica quante volte il prezzo lo ha toccato e quante volte una barra lo ha “superato” (superando il livello e chiudendo nuovamente sul lato originale). I conteggi si basano esclusivamente sulle barre chiuse, quindi non vengono aggiornati. Avvisi opzionali (popup, notifiche push, e-mail, suono) per le superazioni e i nuovi tocchi. La tolleranza di tocco è una frazione dell’ATR o un numero fisso di punti. I 6 livelli dei periodi precedenti e i relativi conteggi dei tocchi sono disponibili in 12 buffer dell’indicatore per l’utilizzo da parte di un Expert Advisor tramite iCustom(). Funziona su qualsiasi timeframe fino a H4. Solo lettura: non apre, modifica né chiude mai un’operazione. Nessuna DLL, nessuna richiesta web.
Checks the chart's history against the symbol's trading sessions and separates real holes from holiday short sessions and days without bars. Marks the holes on the chart, shows coverage and the largest hole, warns when the history stops short of now, and can write a CSV report.
Prop Firm Equity Guard protects prop-firm challenges and funded accounts. It monitors live equity against your daily loss and max drawdown limits, then closes all positions, deletes pending orders and locks trading before the firm's limit is hit. A safety buffer makes it act early, and anything opened while locked is closed instantly. It supports static and trailing drawdown, an optional profit target lock and alerts, saves its state through restarts, and shows an on-chart dashboard with room left and a reset countdown. It works alongside manual trading and other EAs.
Shows the closed trades of the account in R (net profit divided by the money at risk at entry): expectancy, win rate, drawdown in R, losing streak, per-symbol summary and CSV export.
Drag a stop line on the chart and see the volume for a given risk, the real risk after rounding, and a warning when even the minimum volume risks too much.
Higher-timeframe EMA (fast and slow) on a lower-timeframe chart, using only higher-timeframe bars that are already closed. Values never change after the bar closes.
Round number levels for Gold (XAUUSD) and any symbol on MT5. Draws major and minor round levels around price plus Asia, London and New York session open lines, with an optional alert when a candle closes across a major level. Open source code.
Multi timeframe trend dashboard for Gold (XAUUSD) and any symbol on MT5. Shows up, down or flat for up to 6 timeframes from a fast and slow EMA on the last closed bar, with the distance in points and an alert when all line up. Open source code.
Engulfing and inside bar scanner for Gold (XAUUSD) and any symbol on MT5. Marks bullish and bearish engulfing candles and inside bars on closed bars, draws the mother bar range as a box and can alert on each pattern. Arrow buffers for iCustom. Open source code.
One include file that gives your EA or indicator keyboard shortcuts the user types into the inputs, such as Shift+B. Each press fires one action, Shift+B never fires on a plain B, and a shortcut that cannot work is refused at start with the reason.
Watches the equity like a prop firm does: daily loss limit and max loss limit, static or trailing, floating profit included. Stops new trades at a warning level, closes everything on a breach and remembers it after a restart.
Traccia i massimi e i minimi di un intervallo di tempo selezionato e avvisa al primo superamento di ciascuno di essi. I livelli sono disponibili anche tramite iCustom.
Gestisce le posizioni già aperte: aggiunge eventuali SL/TP mancanti, sposta lo stop al break-even, lo fa seguire (trailing), limita il numero di posizioni e applica limiti giornalieri al capitale proprio. Non apre mai nuove operazioni.
Measures how long price takes to come back to its moving average. The histogram shows the distance of the close from an EMA in ATR. Every time that distance first reaches a stretch level (1, 2 and 3 ATR by default), the indicator follows the stretch until the close is back at the average, runs further, or the wait is over. A panel shows, for each level, how often price came back, how often it ran further first, and the median and 80th-percentile number of bars the return took. One line can be pasted into a comment to compare symbols. It is a statistics tool and gives no trade signals.
Account guard for prop-firm challenges. It does not open trades: it watches the whole account (manual trades and any EA) and closes everything before the firm's limits are broken. - Daily loss limit: closes all and blocks trading until the next day. - Max drawdown: static or trailing (can lock at the start balance); closes all and locks the account. - Optional profit-target lock, max lots / max positions, Friday close. - On-chart panel (equity, today's P/L, daily and drawdown room left) and push alerts. - Equity peak and lock are saved per account, so a restart does not reset the protection. Main inputs: StartBalance, DailyLossUSD, DDMode, MaxDDUSD, LockAtStart, safety buffers, TargetUSD, MaxOpenLots, MaxOpenPositions, FridayCloseOn, ResetLock. Attach to any one chart, any symbol and timeframe, with Algo Trading enabled.
Draws a live heatmap of two optimised inputs while the Strategy Tester optimises your EA, and scores every cell by its neighbourhood: the plateau score is the mean minus k times the standard deviation of the surrounding cells. It shows whether your best parameters sit on a stable plateau or on a single lucky cell, and writes an HTML report, a CSV and a picture of the map. Includes a Monte Carlo drawdown criterion and a small demo EA. Part of the free Robustness Lab set.
Takes the closed trades of your account (all, or filtered by magic number and symbol), reshuffles or resamples them thousands of times and shows how deep the drawdown could realistically get. You get drawdown percentiles, the probability of a drawdown above your limit, the spread of final equity, an equity fan chart and a drawdown histogram, on the chart and as an HTML report. Part of the free Robustness Lab set.
Classifies the market as trend, mean-reversion or noise using three public measures: the Hurst exponent by rescaled range with small-sample bias correction, Kaufman's efficiency ratio and the percentile of the current ATR. A colour strip shows the regime bar by bar, and a panel shows the regime on M15, H1, H4 and D1 at the same time. Part of the free Robustness Lab set.
Shows how a symbol has behaved in every hour of every weekday, as a heatmap on the chart. Colour the cells by t-statistic, mean return, hit rate or average range. Cells that pass a significance threshold get a gold frame, and the panel tells you how many cells would pass that threshold by chance alone, so a single lucky hour is not mistaken for an edge. Hover any cell for its full numbers. Part of the free Robustness Lab set.
Calculates the lot size for a risk % and a stop distance on any symbol, using the broker's own profit calculation, so the result is exact for forex, gold, indices, stocks and crypto.
Builds H2 to D1 candles from H1 on the New York close clock, so your indicators see the same candles on every broker, no matter which server time it uses. Detects the server clock automatically.