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 ContinuaAn include file that fills every field of a trade request on purpose, rounds prices to the tick grid, respects stops and freeze levels, and never removes a take profit by accident.
The NIST post-quantum standards in plain MQL5 with no DLL: ML-KEM to agree on a secret key, ML-DSA to sign and verify, and the SHA-3 and SHAKE functions they are built on. Every output matches NIST's official test vectors, OpenSSL and Go byte for byte.
Scans the broker's complete MT5 symbol catalogue, resolves common prefixes, suffixes and aliases, checks trading specifications and exports a compatibility report to CSV.
Seven candlestick patterns with exact rules, trend / swing / size filters against clutter, and a statistics table that compares every pattern with the base rate of the same chart. Closed candles only, no repaint, buffers for EAs.
Average Daily Range from finished days, ADR high / low projected from today's low and high or from the open, range used in percent, a small panel and alerts at 80 / 100 percent. Day from broker or New York time. No repaint.
The panel prints the broker's server clock, your local clock with its GMT zone, the offset between the two to the minute, and the countdown to the close of the chart's current candle. The offset is measured from the terminal's own clocks on every pass, so nothing is typed in and no broker zone is assumed. If you set a lead in seconds and enable a channel, it sends one alert per candle while a bid is available, with the seconds left and the bid; its eight objects stay out of the object list and cannot be selected.
One function call checks the terminal, account, program permission, symbol, trading session, quotes, spread, volume and margin, and tells you in plain words why a new trade cannot be opened. No order is ever sent.
Spread monitor for Gold (XAUUSD) and any symbol on MT5. Shows the spread now, its average and the highest of the day in a small panel and alerts when the spread opens above your limit or above twice the average. Open source code.
Pivot points for Gold (XAUUSD) and any symbol on MT5. Classic or Fibonacci P, R1 to R3 and S1 to S3 from the previous day, week or month, one set per period, with an optional alert when a candle closes across a level. Open source code.
ATR stop loss and take profit levels for Gold (XAUUSD) and any symbol on MT5. Draws the stop and two targets from the ATR for a buy at the ask and a sell at the bid, with the lot for your risk in percent of the balance. Open source code.
Shuffles your closed trades thousands of times to show how deep the drawdown can realistically get (p50/p95/p99), and checks whether your account size can carry it. Reads the account history or a CSV file and writes a readable HTML report.
A custom OnTester() criterion that ranks optimisation passes by net profit factor, number of trades, drawdown and equity-curve linearity. Includes simulated commission, trade export to CSV and a readable HTML report.
Su un grafico lineare MT5, un trend che cresce o cala di una percentuale costante è rappresentato da una curva, mentre un canale rettilineo non riesce a coglierlo. Questo indicatore traccia la curva esponenziale reale, adattata alle barre chiuse sulla finestra di look-back più pulita tra le 19 disponibili, con zone di deviazione, una proiezione in avanti e una scheda che riporta l'adattamento, il ritmo del trend e la posizione del prezzo.
Uno script gratuito per MT5 che consente di calcolare visivamente sul grafico la dimensione della posizione, l'importo del rischio e il rapporto rischio/rendimento.
Smart Money Concepts MT5 — BOS / CHoCH structure, Order Blocks, Equal Highs/Lows, Fair Value Gaps and Premium/Discount zones. MT5 adaptation of the MAJID Smart Money Concepts indicator, free for non-commercial use under CC BY-NC-SA 4.0.
High-performance JSON library for MQL5: single-pass tape parser, DOM, SAX streaming, builder, JSON Pointer, JSONPath-like query VM and typed struct mapping. No DLL required.
Plots daily Asia Session High/Low range boxes, extends session liquidity levels through London and New York sessions, and marks non-repainting closed-bar liquidity sweeps (BSL/SSL) with a live HUD.
Account-wide MT5 prop firm risk monitor that tracks daily and maximum loss headroom, current stop-loss exposure, projected equity and remaining risk capacity.
Summarises the account's closed trades per symbol and shows how much of the gross result was taken by commission, swap and fees.
On-chart panel that sizes your trade: lot size from your risk % and a stop in points or ATR, with spread, broker-minimum, minimum-lot and margin checks. Calculation only - it never trades.
Displays live symbol specifications, broker trading conditions, account information, spread, trading permissions, session status and margin properties directly on the MT5 chart.
A WebRequest-only (no DLL) Telegram library: text and chart screenshot messages with queue and retry, plus ready trade reports (open, close with profit and reason, SL/TP changes, pending orders, daily summary). Includes a ready EA.
This is a free, execution only EA for gold on M15. It compares gold with the Hang Seng (HK50). When gold has split far away from it, the EA trades in the direction of that split, but only while gold itself is calm and hasn't already made the move.
Tick Scalper Helper è uno strumento di trading manuale pensato per i trader che operano su intervalli di tempo molto brevi e desiderano visualizzare ogni variazione di prezzo.
Closes all positions, deletes pending orders and blocks new trades when the daily loss, drawdown-from-peak or daily profit target is reached. Works with manual trading and any other EA. State survives terminal restart.
Moves the stop loss to break-even (with locked profit) and trails it by a fixed distance or an ATR multiple. Never opens or closes trades, the stop loss only moves forward.
Shows the real cost of a trade on the current symbol (spread, commission, swap) and which share of your risk (R) it takes on every timeframe from M1 to D1.
An include file for calculating the size of a position to be opened. It turns a risk figure (percent of the balance, percent of the equity or money), a stop and a commission per lot into a lot size whose loss at the stop never goes over that risk. The lot is always rounded down to the volume step and a risk below the minimum volume returns 0 lots with a reason.
A clean information card for your EA or indicator: rows, progress bars and a status pill on one anti-aliased CCanvas bitmap, light or dark to match the chart, and foldable with a click.
Broker server time, UTC and the local time of London, Frankfurt, New York, Tokyo and Sydney, with daylight saving time on any date, live and in the Strategy Tester.
Free non-repainting MT5 market structure indicator that identifies confirmed HH, HL, LH and LL swings, plots BOS and CHoCH structure breaks, and includes close/wick confirmation, dashboard bias and optional alerts.
Drop it on the chart at your stop-loss level and get the exact lot for your risk. Correct for gold, indices, crypto and cross pairs. It never opens trades.
Closes every position before your prop-firm daily or maximum loss limit is reached and keeps the account flat afterwards. Works next to any EA or manual trading. It never opens trades.
Prop Firm Guard Panel è un pannello integrato nel grafico dedicato alle sfide delle prop firm e ai conti finanziati. Mostra in tempo reale la perdita giornaliera accumulata e il margine residuo, il margine massimo di perdita e il limite minimo di capitale proprio, nonché i progressi verso l’obiettivo di profitto. Il saldo di inizio giornata viene ricalcolato in base alle operazioni chiuse oggi, in modo che i valori rimangano corretti anche dopo un riavvio. I colori cambiano da verde ad arancione a rosso man mano che ci si avvicina ai limiti, con avvisi pop-up e notifiche push opzionali. Tema automatico, scuro o chiaro. Solo visualizzazione: non apre, modifica né chiude mai le operazioni.
Disegna l'intervallo di apertura giornaliero e i relativi livelli di breakout, con un pannello di controllo che mostra come si è risolto l'intervallo nel periodo di analisi: superamento al rialzo, al ribasso, in entrambe le direzioni o per nulla, e con quale frequenza un breakout ha raggiunto il proprio obiettivo prima che si verificasse il movimento opposto.
Utility Expert Advisor that finds open positions without a stop loss or take profit and adds them at a fixed distance in pips from the open price. It never opens or closes trades.
Separate window indicator that draws the spread of every bar as a histogram with its moving average and colors the bars where the spread is far above normal or above a fixed ceiling.
Utility Expert Advisor that reads the built-in economic calendar and sets a terminal global variable to 1 around important events, so other Expert Advisors can skip new entries during the news.
Prints a colorful, print-ready PDF report of your last N trades: KPI cards, a win-rate donut, a zebra table with BUY/SELL pills and diverging profit bars. Pure MQL5 — no DLL, no external converter. Saved to `MQL5\Files`.