OPEN-SOURCE SCRIPT
업데이트됨 Compression Clock (Axiom Multi-TF Adaptive)

**Compression Clock (Axiom Multi-TF Adaptive) — Volatility Regime & State Age**
---
### **Description**
#### **Overview**
The **Compression Clock** is a non-directional volatility regime indicator based on the **Axiom quantitative research framework**. Instead of attempting to forecast market direction, it isolates the temporal dimension (**WHEN**) by measuring the duration and depth of volatility compression across any resolution.
Markets do not transition from quiet to expansion instantaneously; they exhibit a survival-rate decay where prolonged low-volatility states exponentially elevate the baseline probability of large physical displacement. The Compression Clock standardizes this process by normalizing rolling volatility and volume percentiles against a physical-time benchmark.
---
#### **Mathematical & Architectural Core**
1. **Dual-Feature Quiet Filter**:
* Evaluates rolling True Range ($\text{ATR}_{24}$) and Traded Volume ($\text{SMA}_{24}$) scaled against an intraday 24-hour physical window:
$$\text{ATR}_{\text{rolling}} = \text{SMA}(\text{TR}, N_{\text{bars}}), \quad \text{Vol}_{\text{rolling}} = \text{SMA}(\text{Volume}, N_{\text{bars}})$$
* Computes the rolling percentile rank of both features across a rolling 180-day baseline distribution.
* A bar qualifies as **Quiet** if and only if both features sit simultaneously in the lower tercile:
$$\text{Quiet}_t = \mathbb{I}\left(\text{Rank}(\text{ATR}_t) \le 33.33\%\right) \land \mathbb{I}\left(\text{Rank}(\text{Vol}_t) \le 33.33\%\right)$$
2. **Physical-Time Normalization**:
* TradingView indicators often suffer from timescale distortion when hardcoding bar-based periods across multiple resolutions.
* This script dynamically translates resolution minutes ($M_{\text{tf}}$) into actual **physical hours**. Whether applied to a 5-minute, 30-minute, or 4-hour chart, the Y-axis consistently represents **elapsed physical hours of continuous compression**.
3. **Regime State Categorization**:
* **S0 (ACTIVE)**: Market is expanding or fluctuating outside the quiet threshold. Compression age resets to 0.
* **S1 (QUIET, < 24 Hours)**: Early-stage compression. Natural volatility dampening without statistical hazard elevation.
* **S2 (MATURE, 24 – 72 Hours)**: Statistically mature compression. Historical survival analysis indicates a significant elevation in large-displacement probability.
* **S3 (DEEP, > 72 Hours)**: Extreme volatility exhaustion. Persistent absence of dispersion indicating imminent volatility expansion.
---
#### **How to Use (Methodological Discipline)**
* **Decoupled Architecture**:
* The Clock dictates **WHEN** (volatility environment), not **WHAT** (direction) or **HOW** (execution).
* Never treat an S2/S3 state as a directional trade signal. A compression state is directionally agnostic—it warns of imminent displacement hazard, but the direction must be governed by external momentum or structural acceptance/rejection models.
* **Multi-Timeframe Scope**:
* Low-scale compression (e.g., 5m/15m entering S3) reflects localized intraday order book exhaustion. It does **not** override a higher-timeframe S0 state. For macro regime filtering, monitor higher physical resolutions (such as 4H).
* **Buffer Safety**:
* Includes a built-in 4,900-bar memory clamp to prevent buffer overflow exceptions on ultra-low timeframes while maintaining valid causal percentile rankings.
---
#### **Inputs**
* **Rolling Feature Duration (Hours)**: Physical length of the short-term smoothing window (Default: 24h).
* **Lookback Days (Days)**: Historical distribution window for empirical percentile rankings (Default: 180 days).
* **Quantile Rank Threshold (%)**: Cutoff for the quiet regime (Default: 33.333% — bottom tercile).
---
### **Description**
#### **Overview**
The **Compression Clock** is a non-directional volatility regime indicator based on the **Axiom quantitative research framework**. Instead of attempting to forecast market direction, it isolates the temporal dimension (**WHEN**) by measuring the duration and depth of volatility compression across any resolution.
Markets do not transition from quiet to expansion instantaneously; they exhibit a survival-rate decay where prolonged low-volatility states exponentially elevate the baseline probability of large physical displacement. The Compression Clock standardizes this process by normalizing rolling volatility and volume percentiles against a physical-time benchmark.
---
#### **Mathematical & Architectural Core**
1. **Dual-Feature Quiet Filter**:
* Evaluates rolling True Range ($\text{ATR}_{24}$) and Traded Volume ($\text{SMA}_{24}$) scaled against an intraday 24-hour physical window:
$$\text{ATR}_{\text{rolling}} = \text{SMA}(\text{TR}, N_{\text{bars}}), \quad \text{Vol}_{\text{rolling}} = \text{SMA}(\text{Volume}, N_{\text{bars}})$$
* Computes the rolling percentile rank of both features across a rolling 180-day baseline distribution.
* A bar qualifies as **Quiet** if and only if both features sit simultaneously in the lower tercile:
$$\text{Quiet}_t = \mathbb{I}\left(\text{Rank}(\text{ATR}_t) \le 33.33\%\right) \land \mathbb{I}\left(\text{Rank}(\text{Vol}_t) \le 33.33\%\right)$$
2. **Physical-Time Normalization**:
* TradingView indicators often suffer from timescale distortion when hardcoding bar-based periods across multiple resolutions.
* This script dynamically translates resolution minutes ($M_{\text{tf}}$) into actual **physical hours**. Whether applied to a 5-minute, 30-minute, or 4-hour chart, the Y-axis consistently represents **elapsed physical hours of continuous compression**.
3. **Regime State Categorization**:
* **S0 (ACTIVE)**: Market is expanding or fluctuating outside the quiet threshold. Compression age resets to 0.
* **S1 (QUIET, < 24 Hours)**: Early-stage compression. Natural volatility dampening without statistical hazard elevation.
* **S2 (MATURE, 24 – 72 Hours)**: Statistically mature compression. Historical survival analysis indicates a significant elevation in large-displacement probability.
* **S3 (DEEP, > 72 Hours)**: Extreme volatility exhaustion. Persistent absence of dispersion indicating imminent volatility expansion.
---
#### **How to Use (Methodological Discipline)**
* **Decoupled Architecture**:
* The Clock dictates **WHEN** (volatility environment), not **WHAT** (direction) or **HOW** (execution).
* Never treat an S2/S3 state as a directional trade signal. A compression state is directionally agnostic—it warns of imminent displacement hazard, but the direction must be governed by external momentum or structural acceptance/rejection models.
* **Multi-Timeframe Scope**:
* Low-scale compression (e.g., 5m/15m entering S3) reflects localized intraday order book exhaustion. It does **not** override a higher-timeframe S0 state. For macro regime filtering, monitor higher physical resolutions (such as 4H).
* **Buffer Safety**:
* Includes a built-in 4,900-bar memory clamp to prevent buffer overflow exceptions on ultra-low timeframes while maintaining valid causal percentile rankings.
---
#### **Inputs**
* **Rolling Feature Duration (Hours)**: Physical length of the short-term smoothing window (Default: 24h).
* **Lookback Days (Days)**: Historical distribution window for empirical percentile rankings (Default: 180 days).
* **Quantile Rank Threshold (%)**: Cutoff for the quiet regime (Default: 33.333% — bottom tercile).
릴리즈 노트
update display오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.