Join our fan page
The script retrieves your broker’s actual spread from the ‘spread’ field of the M1 bars and displays the median, the 90th and 99th percentiles in price units, in pips and as a percentage of ATR, and also exports the average and maximum spreads for each hour of the day to a CSV file. This is needed to test strategies against the actual costs on your account, rather than against a ‘typical’ spread estimated from memory.
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.
Neural Loss-Pattern Auditor trains a small feed-forward neural network, written from scratch in native MQL5, on closed-deal history to test whether behavioral and market-context features predict which trades are more likely to lose. It reports an accuracy uplift over a naive baseline, a probability-calibration table, a permutation feature-importance ranking, and a configurable A-F composite grade with recommendations. On first run it uses a built-in synthetic demo, so the output is visible immediately with no setup; switch one input to InpUseDemoData=false to analyze real account history instead. Pure MQL5: no external libraries, no Python, and no AI service of any kind.
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 an entry signal actually beats transaction costs, before you spend weeks building an EA around it. Reports net result after cost, an honest t-statistic on non-overlapping samples, and a random control. Places no orders.
Prints the invisible contract limits that silently reject orders: stops level, freeze level, min/step/max lot, tick size and value, spread type, execution mode, swaps, and the margin needed for the minimum lot against your free margin.
Read-only broker-native trading-session inspector with current status, next transition, multi-symbol scope, and CSV export.
Read-only MT5 script reporting broker volume, price, stops, freeze, spread and execution constraints.
Deterministic synthetic acceptance checks for MT5 EA entry-state logic, with no market, account or order access.
Read-only MT5 script that estimates stop-distance cash loss in account currency, reserves explicit cash costs and floors volume to the broker grid. It never sends or modifies an order.
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.
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.
Checks a hypothetical MT5 market or pending order against current symbol, volume, tick-size, stop-distance and filling rules without sending a trade.
Prints a privacy-conscious snapshot of the current MT5 broker, account, symbol and terminal environment to the Experts log for diagnostics and support.
Read-only analytics for accounts that run several Expert Advisors. It groups closed trades by magic number and measures what running those systems together actually saves you: standalone versus combined drawdown, the pairwise correlation matrix drawn as a heat map on the chart, and a Monte Carlo reshuffle of the portfolio's period returns.
Reads a closed-position trade history (a CSV file, or one generated automatically from the current account's deal history by the companion RuinExport.mq5 script) and reports four independent risk fingerprints: volume escalation after a loss, overlapping same-direction exposure that averages into a worse price, payoff asymmetry between wins and losses, and a classical risk-of-ruin estimate at a stated risk per trade. The four scores combine into a single A-to-F grade with plain-language recommendations. If no CSV is found, the script generates a reproducible demonstration book automatically, so the report is visible on the first run.
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.
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.
Open-source MT5 script that records XAUUSD/GOLD symbol settings, spread, tick value, contract size, volume step, stop/freeze levels, swap, and account context to the log and optional CSV.
A native MQL5 script that measures how concentrated a strategy's profit is — whether the edge is broad or rests on a few lucky trades. It reads a per-trade CSV (Date,Profit) and reports the share of net profit from the largest trades, the Gini coefficient of the winners, a concentration profile, a survival test that removes the best few trades and recomputes net profit and profit factor, and the largest single day versus a configurable consistency limit, combined into a concentration-and-consistency score (A+ to F) with recommendations. If no file is found it generates a sample set, so it runs out of the box. No external libraries, no Python, no AI. The helper ExportTrades.mq5 writes the file from your trade history.
A native MQL5 script that analyzes the structure of an account's drawdowns, not just the single "maximum drawdown" figure. It reads a daily equity curve (Date,DailyPnL CSV), rebuilds the underwater curve, and splits it into individual drawdown episodes with their depth, duration and recovery time. It then reports the Ulcer Index, Pain Index, Recovery Factor and time spent underwater, and combines them into a single resilience score (A+ to F) with recommendations, printed in the Experts tab. No external libraries; if no file is found it generates a sample curve so it runs out of the box.
Script to set Stop Loss on every open position based on a target loss in the account's currency (e.g. $50 per position). Works on any deposit currency and any forex symbol. Validates broker stops/freeze levels. Currency conversion handled automatically.
Diagnostic script that compares SYMBOL_TRADE_TICK_VALUE, SYMBOL_TRADE_TICK_VALUE_LOSS and SYMBOL_TRADE_TICK_VALUE_PROFIT for every symbol in Market Watch. Classifies each symbol into one of four categories (ALL_EQUAL, TV_MATCHES_PROFIT, TV_MATCHES_LOSS, ALL_DIFFER) and provides an aggregated summary plus interpretation tip. Useful for verifying which tick-value property to rely on when implementing risk-based lot sizing in EAs. Exports full per-symbol report to CSV in MQL5/Files.
Triple-barrier labeling pipelines frequently use an arbitrary constant (0.5–1.0%) or a legacy spread assumption as the min_ret threshold. A threshold set below the actual round-trip transaction cost causes the pipeline to label cost-driven noise as tradeable signal. The labeled dataset then systematically overstates edge, and any model trained on those labels overfits to an artifact of the labeling scheme rather than to genuine market structure. TransactionCostCollector.mq5 is a standalone script that resolves the data-collection step of this problem.
Utility script that exports your MetaTrader 5 trading history to a CSV file. It automatically calculates Maximum Favorable Excursion (MFE), Maximum Adverse Excursion (MAE), and Forward Returns (Time-Based Excursions) in whole points for deep quantitative analysis in Excel. It will allow you to understand whether you close your trades too early and can help optimize overall trading execution.
The script shows the usage of L1 Trend Filter methods in MQL5 for float and double vectors on random walk simulated data.
Portfolio Scorer is a standalone MQL5 script that evaluates the quality of a multi-EA portfolio across three critical dimensions that most algo traders overlook. The script reads daily profit and loss data from CSV files (one per Expert Advisor), computes a full Pearson correlation matrix between every strategy pair, maps trading activity by UTC hour and weekday, detects asset class diversity, and produces a weighted composite score with a letter grade from A+ to F. How it works: The tool runs in four sequential stages. First, the Data Loader reads and validates CSV files containing daily returns for each EA in the portfolio. Second, the Correlation Engine calculates the complete NxN Pearson correlation matrix and flags pairs that exceed a configurable threshold. Third, the Coverage Analyzer maps which hours and weekdays have active trading and identifies blind spots. Fourth, the Scoring Function combines all three dimensions into a single composite score using adjustable weights.
Download all OHLC data history available and save it in a file, either for just one symbol or for many in Market Watch
This script serves as a practical example of how developers can programmatically work with files using MQL5. One of its key objectives is to demonstrate effective project file organization, which is essential for developers working on large-scale systems or aiming to create portable, self-contained projects. The concept can be expanded further and refined with additional ideas to support more advanced development workflows.
The script provides a quick estimation of an exponent/power factor for transformation of variable-length price increments into uniform distibution, that makes them a "random walk". The estimated value characterizes current symbol as more profitable when using in a particular trading strategy.
This function gives me the shortened names of the timeframes Example: "M1" instead of "PERIOD_M1"
This Screener was created to simplify the process of finding assets trading at discounted prices. Initial usage may take slightly longer due to the data loading process for all selected instruments. The tool can scan all available broker assets or be limited to specific asset classes.
This function performs the main logic of opening a trade. It calculates the opening price, take profit levels and stop loss based on the symbol information and parameters provided by the user. Prepare a trade request (MqlTradeRequest) with the necessary information such as symbol, volume, order type, slippage, comment, magic number, etc. Call the OrderSend function to send the trade request and get the result. SetTypeFillingBySymbol function: determines the order fulfilment type (Fill or Cancel, Immediate or Cancel or Return) according to the symbol's fulfilment policy. GetMinTradeLevel function: calculates the minimum trade level based on the freeze level and stop level of the symbol. Adjusts the minimum level to ensure that it is within certain limits and returns the result.
Functions for use instead of ChartXYToTimePrice and ChartTimePriceToXY, working correctly and quickly over the entire range of input parameters
The script calculates the autocorrelation and partial autocorrelation functions and displays them on a graph