OPEN-SOURCE SCRIPT

Adpative Dual Cloud | NAL

1 159
1. Overview

Adaptive Dual Cloud | NAL is a dual-baseline trend cloud built from two separate smoothing structures: a Kijun-style midpoint baseline and an ALMA baseline. Instead of relying on a single moving average or one volatility model, the indicator builds an adaptive cloud around both baselines and only confirms direction when price escapes the full combined structure.

The purpose of the indicator is to create a stricter trend envelope. The Kijun side captures broader structural balance, while the ALMA side adds a smoother adaptive layer. The final upper and lower cloud boundaries are selected from both systems, forcing price to clear the stronger side of the cloud before a bullish or bearish state is confirmed.


2. Calculation

The indicator starts by creating two independent baselines. The first baseline is a Kijun-style midpoint calculated from the highest and lowest values over the selected lookback. This represents a structural equilibrium zone.

Pine Script®

The second baseline uses ALMA, giving the cloud a smoother weighted-average component with adjustable sigma and offset. This adds a more refined smoothing layer beside the Kijun structure.

Pine Script®

The indicator then calculates volatility using a selectable deviation engine. The volatility source can be price, the residual between price and the cloud average, or the cloud structure itself. This allows the band width to be built from different layers of market behavior.

Pine Script®


The volatility engine supports multiple deviation types, including standard deviation, mean absolute deviation, median absolute deviation, exponential deviation, ATR, linear regression deviation, Hull deviation, FRAMA deviation, Kauffman adaptive deviation, Gaussian deviation, and quantile deviation.

After volatility is calculated, adaptive upper and lower bands are created around both baselines.

Pine Script®


The final cloud uses the highest upper boundary and the lowest lower boundary. This makes the signal more selective because price must break beyond the combined cloud, not just one individual baseline.

Pine Script®


A bullish state triggers when price closes above the final upper cloud. A bearish state triggers when price closes below the final lower cloud. When price remains inside the cloud, the previous state is held.


3. Key Features

  1. Dual-baseline cloud using Kijun structure and ALMA smoothing.
  2. Adaptive upper and lower bands built from selectable volatility models.
  3. Multiple deviation engines for different volatility interpretations.
  4. Selectable volatility source: price, residuals, or cloud structure.
  5. Final cloud requires price to clear the combined upper or lower boundary.
  6. State-based candle coloring, cloud coloring, glow effect, and directional fills.



4. Use

Adaptive Dual Cloud is designed to identify when price escapes a combined structural and smoothed volatility envelope. A close above the upper cloud reflects bullish expansion beyond both baseline systems, while a close below the lower cloud reflects bearish expansion below the combined structure.

The indicator is intentionally stricter than a single-baseline channel. By combining a Kijun-style midpoint with an ALMA baseline, it creates a cloud that filters more of the internal noise before confirming a directional regime.

This indicator is best used as a specialized module within a complete strategy framework. Its role is to isolate a cloud-based volatility and structure layer, where price must prove strength or weakness against more than one adaptive baseline. The full value comes from how this regime signal is integrated into a broader process for timing, structure, and execution.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน