OPEN-SOURCE SCRIPT

Halo SuperTrend | NAL

4 711
Halo SuperTrend is a volatility-adaptive trend framework combining a Zero-Lag Exponential Moving Average (ZLEMA), Average True Range (ATR), and a GARCH-based conditional volatility model.

Conventional SuperTrend indicators construct their trailing boundaries using a fixed ATR multiplier. While ATR captures recent trading ranges, a constant multiplier does not explicitly account for changes in the persistence and clustering of market volatility.

Halo SuperTrend introduces a second volatility layer that dynamically conditions the ATR structure according to the prevailing statistical volatility regime.

The result is a regime-adjusted SuperTrend designed to combine responsive price tracking with adaptive volatility boundaries.

1. Zero-Lag Baseline

The model begins with a ZLEMA baseline, which compensates for part of the lag traditionally associated with exponential smoothing.

Rather than calculating volatility bands around a conventional price midpoint, Halo uses a lag-reduced estimate of underlying price direction.

Pine Script®


This establishes a responsive structural reference around which the volatility-adjusted bands are constructed.

2. GARCH Volatility Regime

The distinguishing component of Halo SuperTrend is its recursive GARCH-style conditional variance model.

Financial-market volatility is rarely constant. Large price disturbances frequently occur in clusters, while quieter market conditions can persist for extended periods.

The model evaluates this behavior through three interacting statistical components:

  1. Recent Volatility Shocks — measures the magnitude of observed price disturbances.
  2. Conditional Variance Persistence — accounts for the influence of previously estimated volatility.
  3. Long-Run Variance — provides a broader reference for the prevailing volatility environment.


An optional adaptive coefficient-fitting process adjusts the relative contributions of these components according to recent observations.

The resulting conditional volatility estimate is processed through a lag-reduced filter and evaluated relative to its own historical baseline.

This produces a dynamic volatility-regime multiplier, rather than treating every volatility environment identically.

3. Hybrid SuperTrend Construction

The GARCH-derived multiplier is applied to the conventional ATR structure, producing a hybrid volatility boundary.

Pine Script®


The multiplier responds to the relative volatility regime while remaining within user-defined minimum and maximum limits.

These boundaries are subsequently converted into persistent SuperTrend-style trailing levels.

Unlike a conventional fixed-multiplier SuperTrend, Halo therefore combines observed price-range volatility with recursively estimated conditional volatility.

4. Directional Regime

The model maintains two directional classifications:

  1. Bullish — price has established a bullish transition, with the lower volatility-adjusted boundary serving as the active trailing structure.
  2. Bearish — price has established a bearish transition, with the upper volatility-adjusted boundary serving as the active trailing structure.


The prevailing regime persists until price crosses the relevant opposing trailing boundary.

Visuals & Interpretation

Halo SuperTrend displays only the active trailing boundary, creating a clean representation of the current directional structure.

The indicator includes:

  1. Distinct bullish and bearish SuperTrend levels.
  2. A vertical gradient connecting the active boundary to the candle body.
  3. Trend-colored candles for immediate regime identification.
  4. A layered SuperTrend glow for greater visual clarity.
  5. Three color presets: Standard, Nordic, and Simple.


The trailing boundary provides a volatility-conditioned structural reference, while its transitions identify changes in the prevailing directional regime.

Practical Application

Halo SuperTrend is designed to study directional persistence, volatility-regime transitions, and adaptive trend structure.

Its central distinction is the separation of two related but different market properties:

How much is price moving, and how is the underlying volatility environment evolving?

ATR describes observed trading-range behavior, while the conditional volatility model provides a separate assessment of volatility persistence and relative regime intensity.

Combining these dimensions allows the trailing structure to adapt without abandoning the established SuperTrend framework.

Automated Alerts

Two built-in alerts monitor confirmed directional transitions:

  1. Bullish Transition — triggers when Halo SuperTrend changes from a bearish to a bullish regime.
  2. Bearish Transition — triggers when Halo SuperTrend changes from a bullish to a bearish regime.


Both alert conditions require bar confirmation, preventing alerts from triggering on temporary intrabar transitions.

For consistent historical and real-time interpretation, TradingView alerts should be configured to Once Per Bar Close.

Configuration

Users can independently adjust the ZLEMA baseline horizon, ATR parameters, GARCH variance estimation, regime normalization, adaptive coefficient fitting, multiplier smoothing, and volatility multiplier limits.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.