indicator · own pane · open source

Hurst Exponent

Deepwick · @deepwickv1Updated 2 Oct 2026▲ 0 users
Running…
Loading chart…

About

Hurst Exponent — simplified log-ratio approximation of the rescaled-range statistic. Above 0.5 the series is trending (persistent), below 0.5 it's mean-reverting (anti-persistent), exactly 0.5 is a random walk.

  • Pair with an EMA crossover: only trade trend signals when Hurst > 0.5.
  • Mean-reversion setups only when Hurst < 0.5.

Source code

//@version=5
indicator("Hurst Exponent", overlay=false)
len = input.int(20, "Length", minval=4, maxval=100)
hurst = math.log10(math.abs(close - close[len])) / (math.log10(2) * math.log10(len))
hline(0.5, "Random walk", color=color.gray)
p_Hurst = plot(hurst, "Hurst", color=color.teal, linewidth=2)
alertcondition(hurst > 0.5 and not (hurst[1] > 0.5), "Trending regime", "Hurst crossed above 0.5 — trend regime")
alertcondition(hurst < 0.5 and not (hurst[1] < 0.5), "Mean-reverting regime", "Hurst crossed below 0.5 — mean-reverting regime")

Comments

No comments yet.

Sign in to comment.