거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Twitter에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
지표

Robustness Lab: Market regime indicator (bias-corrected Hurst, efficiency ratio, volatility) - MetaTrader 5용 지표

Panagiotis Paterakis
Panagiotis Paterakis
  • Algorithmic trading developer (MQL5, cTrader C#, Python) 에  Self-employed
  • 그리스
  • 333
I design, code and run automated trading systems. My own systems trade forex, indices and gold live on cTrader (C#), across several brokers, so I work through the full cycle: clear strategy rules, backtesting with realistic costs, robustness checks around the chosen parameters, live deployment, and
조회수:
142
평가:
(1)
게시됨:
RL_Regime.mq5 (14.38 KB) 조회
\MQL5\Include\RobustnessLab\
RL_Common.mqh (8.96 KB) 조회
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

Plain rescaled-range Hurst estimates are biased upwards on short windows: on pure random data with 128 returns they read around 0.58, which looks like a trend that is not there. This indicator corrects for that.

Market regime indicator, EURUSD H4

How it works

  • Hurst exponent: R/S is measured on several window sizes and compared with the Anis-Lloyd / Peters expected value for random data. The remaining offset is calibrated once on simulated noise, so random data reads close to 0.50. Even corrected, a 128-return estimate has a standard error of about 0.08, so treat it as context, not as a stand-alone signal.
  • Efficiency ratio: net move divided by the total path travelled over the period (0 = pure back and forth, 1 = straight line).
  • Volatility percentile: where the current ATR sits within its own recent history.
  • Regime: trend when Hurst is at or above the upper level and the efficiency ratio is at or above its level; mean-reversion when Hurst is at or below the lower level; noise otherwise.

On the chart

  • Blue line: bias-corrected Hurst, with levels at 0.45, 0.50 and 0.55.
  • Gold line: efficiency ratio. Dotted line: volatility percentile.
  • Colour strip at the bottom: green = trend, orange = mean-reversion, grey = noise.
  • Panel: regime, Hurst, efficiency ratio and volatility state on M15, H1, H4 and D1.

Inputs

Hurst window (returns), efficiency ratio period, ATR period, volatility lookback, Hurst levels for trend and mean-reversion, efficiency ratio level for trend, bars to calculate, show panel.

Notes

  • Requires RL_Common.mqh in MQL5\Include\RobustnessLab (included).
  • The indicator describes the recent past. It does not predict the next move.

The screenshot shows EURUSD H4 on a MetaQuotes demo account.

Robustness Lab: Seasonality heatmap with t-statistics (hour x weekday) Robustness Lab: Seasonality heatmap with t-statistics (hour x weekday)

Shows how a symbol has behaved in every hour of every weekday, as a heatmap on the chart. Colour the cells by t-statistic, mean return, hit rate or average range. Cells that pass a significance threshold get a gold frame, and the panel tells you how many cells would pass that threshold by chance alone, so a single lucky hour is not mistaken for an edge. Hover any cell for its full numbers. Part of the free Robustness Lab set.

Risk Lot Calculator Risk Lot Calculator

Calculates the lot size for a risk % and a stop distance on any symbol, using the broker's own profit calculation, so the result is exact for forex, gold, indices, stocks and crypto.

Robustness Lab: Monte Carlo drawdown analysis of your trading history Robustness Lab: Monte Carlo drawdown analysis of your trading history

Takes the closed trades of your account (all, or filtered by magic number and symbol), reshuffles or resamples them thousands of times and shows how deep the drawdown could realistically get. You get drawdown percentiles, the probability of a drawdown above your limit, the spread of final equity, an equity fan chart and a drawdown histogram, on the chart and as an HTML report. Part of the free Robustness Lab set.

Robustness Lab: Optimisation robustness map with plateau score for the Strategy Tester Robustness Lab: Optimisation robustness map with plateau score for the Strategy Tester

Draws a live heatmap of two optimised inputs while the Strategy Tester optimises your EA, and scores every cell by its neighbourhood: the plateau score is the mean minus k times the standard deviation of the surrounding cells. It shows whether your best parameters sit on a stable plateau or on a single lucky cell, and writes an HTML report, a CSV and a picture of the map. Includes a Monte Carlo drawdown criterion and a small demo EA. Part of the free Robustness Lab set.