Discussing the article: "Expectancy and Trade Quality Score Dashboard in MQL5"

 

Check out the new article: Expectancy and Trade Quality Score Dashboard in MQL5.

We present an MQL5 script that converts closed trade history into comparable metrics: expectancy in currency, pips, and R-multiples, plus a sample-aware win rate via the Wilson interval. These inputs form a conservative, dimensionless Trade Quality Score. The tool draws a CCanvas panel, prints an Experts-tab report, and supports an hour-based session filter to analyze a defined trading window alongside full-history results.

Win rate is the first number most traders check, and the easiest one to misread. A strategy that wins seventy percent of the time is not automatically better than one that wins thirty percent, since win rate says nothing about the size of wins versus losses. A low win rate strategy with large winners and small losers can outperform a high win rate strategy that does the opposite.

Sample size compounds the problem. A sixty-five percent win rate from eight trades and the same win rate from four hundred trades are not equally trustworthy, even though they look identical on screen. This article builds an MQL5 script that reads closed trade history and reduces it to a single figure: the Trade Quality Score. The score is based on expectancy and adjusted for the amount of evidence behind the win rate.

The tool is a script. It reads history once, computes the metrics, draws a CCanvas panel, and leaves it on the chart. It can also narrow history to a configurable hour-of-day window, used here to approximate the London session in server time, and show full-history and session-filtered numbers side by side.

Architectural diagram

Author: Ushana Kevin Iorkumbul