Metis Hurst Regime
- Göstergeler
-
Victor Gomez Sanchez
Industrial electronics and automation engineer, with over ten years trading and investing in the markets. I design trading systems for MetaTrader 5 with the same discipline applied to a work of engineering: clear structure, exact calculation, and every component with a verifiable purpose. - Sürüm: 1.0
Metis Hurst Regime — is the market trending, mean-reverting or just random?
This indicator estimates the Hurst exponent of the recent price series — a statistical measure of memory. It tells you whether moves have tended to continue (trending), to reverse (mean-reverting) or to show no memory at all (random walk), and how much confidence that reading deserves. Knowing the current regime helps you choose the right kind of strategy: trend-following logic suffers in mean-reverting conditions and vice versa.
How it works
- Over a sliding window (default 100 bars) it computes logarithmic returns and applies rescaled range analysis: the window is split into blocks of several sizes, each block's range of cumulative deviations is divided by its standard deviation, and a regression in logarithmic scale gives the Hurst exponent.
- Reading the value: around 0.5 means no memory (random walk); above the upper band (default 0.55) means persistent, trending behaviour; below the lower band (default 0.45) means anti-persistent, mean-reverting behaviour. Both bands are configurable.
- Finite-sample bias correction: on short windows the raw statistic is inflated — a pure random walk would read about 0.59 with the default 100-bar window, not 0.5. At startup the indicator measures that inflation for your exact settings by simulating a no-memory market with a fixed, reproducible procedure, and re-centers the value so 0.5 truly means no memory. The measured amount is printed in the startup log, so you can check it rather than take it on faith. You can disable the correction to see the raw value; while it is off, the panel flags that the Hurst shown is raw.
- Confidence value (0-100%): combines the distance from 0.5 with the quality of the regression fit (R squared). Both must be high for a high confidence. A low confidence means the reading should be treated as noise. This matters because individual readings scatter by roughly ±0.09 with the default window: the regime label alone will change on noise, and the confidence value is what tells you whether to believe it.
- The line in the sub-window is colored by regime (trending, mean-reverting, neutral) and an on-chart label shows the current regime, the Hurst value and the confidence.
- The estimator was verified on synthetic series with known behavior: persistent series read above the trending band, anti-persistent and oscillating series read below the mean-reverting band, and random walks read near 0.5.
- If there is not enough history, or a flat market makes the statistic undefined, the indicator plots an empty value instead of fabricating a number, and reports it in the log.
Main inputs
- Lookback window, smallest sub-window, number of regression scales, minimum valid scales.
- Trending and mean-reverting thresholds.
- Log returns (recommended) or simple price differences.
- Bias correction on/off.
- Panel corner and offsets; line colors and width.
Requirements and notes
- MetaTrader 5, any symbol and timeframe with at least window+1 bars of history.
- The value describes the recent past of the series; it is a statistical estimate with sampling noise, not a prediction and not a trading signal by itself.
- Calculation is incremental (only new bars are recomputed), so it stays light on every tick.
