OPEN-SOURCE SCRIPT
Hurst Exponent Strategy [Fast + Weekly]

## Overview
The **Hurst Exponent Strategy [Fast + Weekly]** is an advanced quantitative tool that calculates the Hurst Exponent ($H$) using the Rescaled Range (RR/S$) analysis. Instead of tracking directional momentum or price overlays, this indicator measures the **statistical memory** and fractal dimension of financial time series to detect market regimes.
It helps traders identify whether an asset is trending, mean-reverting, or trapped in a state of pure noise (chaos).
---
## The Mathematics of Market Regimes
The indicator evaluates the price action and plots values between 0 and 1, anchored to a theoretical center line of **0.5 (Random Walk)**:
- **$H > 0.60$ (Trend / Persistent):** The market possesses long-term memory. Price movements tend to be followed by movements in the same direction. Ideal for trend-following strategies.
- **$H < 0.45$ (Elastic / Anti-Persistent):** The market behaves like a rubber band (Mean Reversion). Price movements are consistently followed by reversals. Ideal for grid, mean-reversion, or range-bound strategies.
- **$0.45 \le H \le 0.60$ (Chaos / Random Walk):** The price action mimics a Brownian motion. Movements are random, noise is high, and directional edge is minimal.
---
## Dual Timeframe Framework
To avoid fighting macro market structures, this script calculates two separate Hurst metrics simultaneously:
1. **Fast Hurst (Cyan Line):** Calculated on the current chart timeframe. It responds quickly to micro-regime shifts, pinpointing when a consolidation is breaking into a trend or expanding into chaos.
2. **Macro Hurst (Orange Line):** Multi-timeframe execution locked exclusively to the **Weekly ("W") chart**. It acts as a structural filter, keeping you aligned with the true macro nature of the asset.
Both exponents feature an optional built-in **Smoothing filter (SMA)** to remove high-frequency mathematical noise without heavily lagging the structural reading.
---
## Real-Time Informative Legend
The top-right dashboard monitors the live mathematical output of both exponents:
- Displays exact numerical values down to 4 decimal places.
- Dynamically classifies the market state into **TREND** (Green), **ELASTICO** (Red), or **CAOS** (Gray) for instant visual confirmation.
---
Disclaimer: This tool calculates mathematical probabilities based on historical fractal dimensions. It does not provide entry/exit arrows or guarantee profits. Use it as a regime filter alongside your preferred execution strategy.
The **Hurst Exponent Strategy [Fast + Weekly]** is an advanced quantitative tool that calculates the Hurst Exponent ($H$) using the Rescaled Range (RR/S$) analysis. Instead of tracking directional momentum or price overlays, this indicator measures the **statistical memory** and fractal dimension of financial time series to detect market regimes.
It helps traders identify whether an asset is trending, mean-reverting, or trapped in a state of pure noise (chaos).
---
## The Mathematics of Market Regimes
The indicator evaluates the price action and plots values between 0 and 1, anchored to a theoretical center line of **0.5 (Random Walk)**:
- **$H > 0.60$ (Trend / Persistent):** The market possesses long-term memory. Price movements tend to be followed by movements in the same direction. Ideal for trend-following strategies.
- **$H < 0.45$ (Elastic / Anti-Persistent):** The market behaves like a rubber band (Mean Reversion). Price movements are consistently followed by reversals. Ideal for grid, mean-reversion, or range-bound strategies.
- **$0.45 \le H \le 0.60$ (Chaos / Random Walk):** The price action mimics a Brownian motion. Movements are random, noise is high, and directional edge is minimal.
---
## Dual Timeframe Framework
To avoid fighting macro market structures, this script calculates two separate Hurst metrics simultaneously:
1. **Fast Hurst (Cyan Line):** Calculated on the current chart timeframe. It responds quickly to micro-regime shifts, pinpointing when a consolidation is breaking into a trend or expanding into chaos.
2. **Macro Hurst (Orange Line):** Multi-timeframe execution locked exclusively to the **Weekly ("W") chart**. It acts as a structural filter, keeping you aligned with the true macro nature of the asset.
Both exponents feature an optional built-in **Smoothing filter (SMA)** to remove high-frequency mathematical noise without heavily lagging the structural reading.
---
## Real-Time Informative Legend
The top-right dashboard monitors the live mathematical output of both exponents:
- Displays exact numerical values down to 4 decimal places.
- Dynamically classifies the market state into **TREND** (Green), **ELASTICO** (Red), or **CAOS** (Gray) for instant visual confirmation.
---
Disclaimer: This tool calculates mathematical probabilities based on historical fractal dimensions. It does not provide entry/exit arrows or guarantee profits. Use it as a regime filter alongside your preferred execution strategy.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.