Discussing the article: "Entropy-Based Market Efficiency Indicator in MQL5: Measuring Randomness in Price Returns Using Approximate Entropy"
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: Entropy-Based Market Efficiency Indicator in MQL5: Measuring Randomness in Price Returns Using Approximate Entropy.
A rolling-window Approximate Entropy oscillator for MQL5, built without external dependencies. Covers the full mathematics of template matching, Chebyshev distance, and the Phi-function derivation before presenting a reusable CApEnCalculator class and a color-zoned subwindow indicator. Includes a synthetic-data verification script and an honest discussion of bias, parameter sensitivity, and computational cost.
MQL5's built-in indicators report price level, momentum, volatility or volume, but none provide a direct, quantitative measure of how predictable the recent return sequence is. Traders therefore rely on eyeballing “chop vs trend” or on volatility proxies that conflate quiet with predictability and volatility with structure — a misleading shortcut, because a series can be volatile yet highly structured (large trending bars) or quiet yet essentially random (tight consolidation with no serial dependence).
This article fills that gap by introducing Approximate Entropy (ApEn) as a practical, native MQL5 tool to measure short-term predictability of closed-bar log-returns. It derives ApEn from first principles, implements a standalone CApEnCalculator class with no external dependencies, supplies a complete subwindow indicator (ApEnIndicator.mq5) that color-codes three regime zones with configurable thresholds, and includes a TestApEn script to verify behavior on synthetic series. Crucially, the article frames ApEn as a gating filter for directional logic (not as a trade signal): read the indicator from your EA via iCustom/CopyBuffer (use shift=1 to avoid intrabar look-ahead), and disable directional entries when ApEn exceeds your chosen upper threshold. The code and inputs are transparent and portable so you can validate and tune the gate for your symbol, timeframe, and execution costs before deploying it live.
Author: Ushana Kevin Iorkumbul