Watch how to download trading robots for free
Find us on Twitter!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Libraries

OnTester Robustness Score with Simulated Commission and Trade CSV Export - library for MetaTrader 5

Frederick David Diaz Arenas
Frederick David Diaz Arenas
  • MT5 & NinjaTrader 8 Developer | Strategy Validation at  Global Traders
  • Chile
  • 137
I turn your trading rules into a working Expert Advisor for MetaTrader 5 (or a NinjaTrader 8 strategy), and I test whether the strategy has a real edge before you risk money.
What I can do for you:
Views:
41
Rating:
(1)
Published:
\MQL5\Include\
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

The default optimisation criteria reward the highest profit, even when it comes from a handful of trades or from a fragile equity curve. RobustnessScore.mqh adds one custom criterion that prefers results that are profitable after costs, have enough trades, a moderate drawdown and a steady equity curve.

Robustness score report on a single test

It takes two lines in any EA you have the source of:

#include <RobustnessScore.mqh>
double OnTester() { return RobustnessOnTester(); }

Then set the optimisation criterion to "Custom max".

The score is 100 × (PF − 1) × fN × fDD × R², calculated on net trade results: profit factor after commission, a penalty when there are few trades, a penalty for drawdown, and the R² of the cumulative P/L. Passes with a net loss or too few trades get −1,000,000.

On a single test it also prints a summary per half-year, with and without commission, and can export every closed trade to a CSV file in Common\Files for further analysis. It also writes a readable HTML report to Common\Files (English or Spanish): every metric explained in plain language, a one-sentence verdict, a half-year table and the equity curve. Open it in a browser or print it to PDF.

Inputs:

  • Simulated commission per lot, round turn: added to the commission already charged by the broker. Leave 0 if your symbol already includes commission.
  • Minimum number of trades required to score.
  • Export trades to CSV (single runs only) and CSV file name.
  • Report language (English or Spanish).

The demo EA (a moving-average crossover) only shows how to connect the library; it is not meant to be profitable.

Smart Money Concepts MT5 Smart Money Concepts MT5

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.

JsonParserByLeo JsonParserByLeo

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.

Monte Carlo Drawdown from Your Account History, with Capital Check Monte Carlo Drawdown from Your Account History, with Capital Check

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.

ATR Stop Loss Take Profit Levels ATR Stop Loss Take Profit Levels

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.