Watch how to download trading robots for free
Find us on Telegram!
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
Scripts

Hidden Risk of Ruin Auditor - script for MetaTrader 5

Real author
Published by:
Cristian David Castillo Arrieta
Cristian David Castillo Arrieta
Finance and International Business professional with a specialization in Financial Management. Self-taught MQL5 and Python developer focused on algorithmic trading, multi-asset portfolio construction, and quantitative risk management.
Views:
528
Rating:
(1)
Published:
RuinAuditor.mq5 (28.6 KB) view
RuinExport.mq5 (9.36 KB) view
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

RiskRuin


A high win rate and a smooth equity curve cannot tell you whether a strategy is quietly escalating position size after losses or averaging into a losing move. This script answers that question directly from the trade history.

The script reads a closed-position CSV and prints a full report in the Experts tab:

  • Volume escalation after a loss — the martingale fingerprint.
  • Overlapping same-direction exposure — the grid/averaging fingerprint.
  • Payoff asymmetry — many small wins next to a disproportionately large loss.
  • Classical risk of ruin — a heuristic approximation at your stated risk per trade.
  • A composite score (A to F) combining the four dimensions, with written recommendations.

Input. Place a CSV named in the InpCsvFileName input parameter (default RuinAuditorSample.csv) in the terminal MQL5\Files folder, with the header OpenTime,CloseTime,Symbol,Type,Volume,OpenPrice,ClosePrice,Profit and one row per closed position. On the first run, if no file is found, the script generates a reproducible demo book instead and analyzes that, so the output is visible immediately. The companion script RuinExport.mq5 writes that CSV directly from your own account's trade history: run it once as a standalone script, then point RuinAuditor.mq5 at the file it wrote.

Parameters. Every reference threshold (the escalation ratio, the overlap and payoff bands, the risk fraction per trade, the composite weights, and the grade boundaries) is exposed as an input, so the sensitivity of each dimension and the final letter grade can be retuned without editing the code.

Smart Trend Score Smart Trend Score

Smart Trend Score is a clean and lightweight MetaTrader 5 indicator designed to identify high-quality trading opportunities using multiple trend and momentum filters.

Session-Based Liquidity Breakout Session-Based Liquidity Breakout

Session-Based Liquidity Breakout & Fibonacci Retracement Strategy (often used in Forex or Crypto trading). It simplifies trading by avoiding complex Smart Money Concepts (SMC) like Order Blocks or Fair Value Gaps, relying instead on Asian Session liquidity, timing (session open), and Fibonacci levels.

SteepMA Steep Moving Average Trend EA SteepMA Steep Moving Average Trend EA

SteepMA V0.7 is a trend-following EA that uses ‘moving average steepness’ as its core entry criterion. It screens for high-certainty market conditions by quantifying trend strength, and locks in profits through a dynamic stop-loss system that tightens progressively. It also features a built-in SQLite database to ensure full traceability of the entire trading process.(Some code has been omitted to facilitate approval.)

SimpleTradeStats SimpleTradeStats

Statistics on closed trades. The indicator shows trading results, filtered by magic number.