Top scripts for MetaTrader 5 based on user ratings - 3

Submit your code

A native MQL5 tool that reconstructs closed positions from deal-level history, flags the ones closed through more than one exit, and reprices each one at its own first, last, and best exit rates to measure whether scaling out actually added value. Reports a Value-Add Ratio, a Scale Out Win Rate, an Efficiency figure, and a single-trade dependence check, combined into an A+ to F score with recommendations. Runs out of the box against a built-in demonstration data set; a companion script exports the real input file from your own account history. Pure MQL5, no external libraries.

A read-only audit script for accounts running several EAs (or manual trades alongside them). It groups the closed-trade history by magic number and prints one line per magic: closed round turns, net P/L including swap and commission from BOTH sides of the trade, win rate, profit factor, average win/loss, currently open positions and pendings, activity dates and symbols - sorted by net result, with a CSV export for spreadsheets.

Deterministic synthetic acceptance checks for MT5 EA entry-state logic, with no market, account or order access.

Most reports give you one drawdown number - the worst one. This read-only script measures all three that matter on your own closed history: depth, duration and frequency. It prints the maximum drawdown with its peak, trough and recovery dates, the longest underwater period in days, whether you are at a new peak or how far below it and for how long, and a table of the deepest episodes with the days each took to recover. An episode is not a losing streak: it closes only when a NEW high is made, so a dip that never reclaims the old peak stays the same episode - which is what makes the duration column meaningful. Entry commissions are included and a partial close counts as one round turn, so the curve carries full cost. Optional percentage figures and CSV export. Deposits and withdrawals are excluded: this is the drawdown of your trading, not of your balance line.

Measures whether a drawing indicator repaints, instead of asserting that it does not. The invariant: once a bar has closed and been processed, no object drawn on it may ever change - not move, not recolour, not change its text, and not disappear. The script seeds a custom symbol with real history, attaches your indicator through a template, records every object, appends bars, forces a full recalculation, and compares object by object. Changes and disappearances are counted separately, because only a change means the claim is false. A run that compared nothing is reported as INCONCLUSIVE, never as a pass. Output is a CSV you can publish next to the number.

A read only MT5 script that reports broker symbol specifications, volume limits, price settings, execution modes, trading permissions, margin requirements and estimated profit values.

The script prices one night of holding: for every open position and every Market Watch symbol it prints the swap per night in your account currency, the annualized cost in percent for both directions, the broker's rate-independent markup (|swap long| + |swap short| never depends on interest rates - it is pure broker margin), and the triple-swap day. Honest "n/a" where a swap mode cannot be converted reliably.

Checks your trade history against common prop-firm challenge rules — profit target, max daily loss, max drawdown, consistency rule, and minimum trading days — with a clear PASS/FAIL report.

A simple MQL5 script that calculates the correct lot size for a trade based on your account risk percentage and stop loss distance in pips, so every trade risks a consistent, controlled amount of your balance.

Exports one CSV line per closed trade with the numbers a statement does not carry: the best unrealised profit the trade showed (MFE), the worst unrealised loss it survived (MAE), how much of the MFE was actually kept, how many bars it spanned, and how long it was held. Same measurement as the Trade Excursion indicator, written to a file instead of drawn, because the questions worth asking of this data are ones a chart cannot answer: does the capture ratio depend on the hour of entry? Are the trades I close early the ones I hold longest? Do losers on Mondays reach a different MAE than on Fridays? Those are one pivot table away once the CSV exists. Output is semicolon separated with a header row, in MQL5\Files; opens in any spreadsheet. Measurement limit: excursions come from bar highs and lows on the chosen timeframe; the path inside a bar is unknown. The bars column reports the resolution each trade got, and the summary counts single-bar trades separately instead of averaging them in.

A quick market scan to identify sustainable trends. The script analyses all symbols from the ‘Market Overview’ in a matter of seconds and identifies instruments with the clearest and strongest price movements using R² linear regression and the ADX indicator.

MarketInfo is a simple information script for MetaTrader 5. It collects and logs key data for the current instrument: prices, spread, volatility (ATR), time remaining until the bar closes, statistics covering N bars, and trend identification.

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.

Script that lists the global variables of the terminal with value, last access time and age, filtered by prefix, substring and age. It exports them to CSV, deletes the matching ones after a confirmation and a backup, and restores them from a CSV file.

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.

Measures how far your PC clock is from the trade server's clock, from the server time stamped on live ticks, and tells you how to fix it.

Running several EAs on one account? This script groups the closed trades by magic number and shows the score of each EA: win rate, profit factor, net profit and drawdown. Read-only, writes a CSV file.

Shows what every buffer of an indicator holds - arrows, a line or a colour index - and labels the arrows on the chart with their buffer numbers. Works with compiled indicators without source code.

A script for accounts that run several Expert Advisors or configurations. It aggregates the net result of each configuration (magic number, or magic number and symbol) per calendar day and measures how much each one contributes to the portfolio drawdown: drawdown added by leave-one-out, share of the worst drawdown, and Euler variance share. It prints verdicts, recommendations, and a heuristic A+ to F score. It runs out of the box on a built-in demonstration portfolio and is written in pure MQL5.

Before the Friday close: estimates how much your open positions could lose if the market reopens with a gap, and compares it with the room left under the daily loss limit of the next trading day. For prop firm and funded accounts. It only reads the account.

Reads your closed trades, converts each to an R-multiple and simulates many future runs at a chosen risk per trade. Reports the probability of hitting a drawdown floor, the probability of ending profitable, the median ending balance and the 95% range. Read-only.

Closes all open positions and optionally deletes pending orders with one click. Filter by symbol and magic number.

For every closed position the script measures how far the price went against it (MAE) and in its favour (MFE), and shows what that says about your stops and exits. Table, summary on the chart and a CSV file. Read-only, it never trades.

Tests "buy at hour X, exit Y hours later" on your broker's own history after spread, commission and swap, with an out-of-sample split, weekday/year breakdown and an all-hours baseline.

Reads real tick history and reports average, median and 95th-percentile spread for every server hour and weekday, plus the cost in % of price.

Script that reads the deal history of your account and writes a plain note on how an Expert Advisor really trades: entries, stops and trailing, lot changes, martingale, averaging, trades at once, hours and holding time, plus what to watch out for. It never trades and says nothing about profit

A free MT5 script to calculate position size, risk amount, and risk-to-reward ratio visually on the chart.

Finds out why an EA or trade copier cannot trade on your account. Read-only script, never trades.

Shows the risk every past trade really took (the loss at its stop loss as a % of the balance at entry) and how far a fixed lot drifted from the tested risk. Read-only.

Execution-safe utility script to close open positions in one click with configurable slippage deviation, spread guard protection, symbol/P&L/Magic filters, and automatic retry handling.

Read-only forensic script that audits historical broker Bid/Ask ticks in 15-day RAM-safe chunks: computes session spread percentiles (P50/P95), 23:00-00:15 rollover widening ratios, weekday feed blackout gaps, and exports clean millisecond CSV files.

Small label on the chart. the symbol is open or closed now, the time left to the close or to the next open, and the sessions of today. It reads the trade sessions of your broker. Display only.

Exports the closed positions of the account to a CSV file (one row per position) and shows a summary: trades, win rate, profit factor, net result, max drawdown and results per symbol. Read-only.

A script that turns candles into a MIDI file: one instrument per symbol, meter detected from the data, pitch from the move, duration from the candle body.

Execution & Slippage Forensics audits MetaTrader 5 account history (Orders vs Deals) to quantify real execution quality in points and currency.

Closes open positions and deletes pending orders in one run, with filters for symbol, magic number, side and profit or loss. Asks for confirmation and retries failed closes.

Calculates the correct lot size from your risk (% of balance, % of equity or a fixed amount) and stop-loss distance. Shows actual risk and margin. Never places trades.

Shows, for each timeframe and symbol, how many bars an EA, indicator or script can read on a live chart and from what date, and flags the timeframes where "Max bars in chart" cuts off older history that the terminal already has.

A script that sets your own margin call and stop-out levels above the broker's. It alerts when the margin level falls below your margin call level and, below your stop-out level, closes positions one at a time, the worst net result first, until the level is back up, the way a broker stop-out works.

Saves the closed trades of your MT5 account history to a CSV file, one row per trade, plus a second file with totals for each magic number.

1234567891011