OPEN-SOURCE SCRIPT

Volatility Regime Classifier | ATRP Percentile Zones

1 327
This indicator helps you understand the current volatility environment of any asset by comparing recent ATR-based values to its historical range.

It defines four regimes:

🔴 Low Volatility: Volatility is decreasing

🟢 Normal: Volatility is increasing but still below average

🟠 High: Volatility is elevated

🟣 Extreme: Volatility is very high compared to recent history

⚙️ How it works
We calculate the Average True Range (ATR) as a percentage of price (ATRP), then compare a short-term ATR to a longer-term one. Their difference shows whether volatility is picking up or slowing down.

To make the signal more adaptive, we look at the distribution of recent volatility over a rolling window. We compute the 50th and 70th percentiles of that history to set dynamic thresholds.

About distribution & percentiles
Volatility in financial markets doesn't follow a normal (Gaussian) distribution, it's often skewed, with sudden spikes and fat tails. That means fixed thresholds (like "ATR > 20") can be misleading or irrelevant across assets and timeframes.

Using percentiles solves this:

The 50th percentile marks the middle of the recent volatility range.

The 70th percentile captures a zone where volatility is unusually high, but not too rare, which keeps the signal usable and not overly sensitive.

These levels offer a balance:
⚖️ not too reactive, not too slow — just enough to highlight meaningful shifts.

✅ Use cases
Spot changes in market conditions

Filter or adapt strategies depending on the regime

Adjust position sizing and risk dynamically

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.