You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Comparing Trade Return Distributions with Mann-Whitney U in MQL5.
A native, dependency-free MQL5 implementation of the Mann-Whitney U test for comparing trade returns across two market regimes. It details rank calculation, tie correction, and a normal-approximation p-value, and pairs the test with a CCanvas box-and-whisker chart and a trade-history extraction script. A verification script is included, and the limits of the normal approximation and independence assumptions are clearly stated for informed use.
A common practice when evaluating a trading strategy across two market periods is to compute the average return in each period and compare the two numbers. This comparison is fast and intuitive, but it is statistically unreliable for trade return data. Trade returns are skewed by asymmetric win/loss structures, exhibit fat tails from slippage and gap events, and are frequently dominated by a handful of outlier trades that pull the mean away from where the bulk of the distribution sits. Two periods can have nearly identical mean returns while having distributions that look nothing alike.
MQL5 has no built-in non-parametric test for comparing two return samples without assuming a distribution shape. This article builds one. The implementation has three components:
The full workflow is: ExtractReturns pulls two date-windowed return samples from the terminal's trade history, CMannWhitneyTest performs the statistical test, CBoxPlotRenderer plots the result, and the demo script connects all three. The complete source files are included in the archive attached at the end of the article.
Author: Ushana Kevin Iorkumbul