Discussing the article: "How to Implement R/S Analysis and the Hurst Indicator in MQL5"

Check out the new article: How to Implement R/S Analysis and the Hurst Indicator in MQL5.

The Hurst exponent indicator for MQL5 is based on R/S analysis using OLS regression in log-log space. The theoretical basis is the findings of Gatheral–Jaisson–Rosenbaum (2014), according to which volatility follows fractional Brownian motion with H ≈ 0.10. The indicator estimates H within a moving window, identifies anti-persistent (H < 0.3), neutral, and trending (H > 0.5) market regimes, colors the line, and triggers an alert upon a regime change, helping you choose a strategy type and manage risk.

If you have ever built a trading system based on historical volatility, you know that feeling of disappointment. The system performs perfectly in the backtester: the Sharpe ratio is high and drawdowns are minimal. You then run it live, and two or three months later, you see the equity curve start to drop just as the market suddenly becomes highly volatile. Classical volatility models failed.

The problem is not with the parameters or overfitting; it runs deeper — it lies in the fundamental assumption underlying GARCH, Black-Scholes, and most classical models: that volatility changes smoothly and randomly, like a standard Brownian motion.

The real market does not behave that way.

In 2014, Gatheral, Jaisson, and Rosenbaum published a paper that revolutionized our understanding of the nature of volatility. They found that the volatility of financial markets is described by fractional Brownian motion with a Hurst exponent H ≈ 0.10. This number is key: it means that volatility is much rougher and more unpredictable than previously thought. Its sample path is nowhere differentiable. That is precisely why any model that assumes volatility is smooth is bound to fail.

This article explains how to turn this mathematical discovery into a working MQL5 indicator. Not a theoretical overview, but a practical tool: a rolling-window Hurst exponent estimator that identifies the market regime in real time and signals changes in its character.


Author: Galym Yechshanov