OPEN-SOURCE SCRIPT

Adaptive Baseline Suite | NAL

2 946
1. Overview

Adaptive Baseline Suite | NAL is a multi-baseline trend indicator that compares price against five different adaptive baseline systems. Instead of relying on one smoothing method, it builds separate volatility bands around a Kijun Sen, DEMA, Median, Laguerre Filter, and Gaussian Filter.

Each baseline produces its own bullish or bearish state. These states are then averaged into a final TPI-style score, giving a broader view of whether price is generally trading above or below its adaptive baseline structure.

2. Calculation

The indicator starts by calculating five independent baselines:

Pine Script®


Each baseline represents a different way of defining the market’s fair-value zone. The Kijun Sen captures midpoint structure, DEMA reacts faster to trend changes, Median reduces noise, Laguerre smooths price recursively, and the Gaussian Filter applies weighted smoothing around a bell-curve distribution.

After the baselines are created, volatility bands are calculated around each one. The indicator measures the residual between price and the baseline, then applies a MAD (Mean aggregate deviation) volatility estimate:

Pine Script®


This creates adaptive upper and lower bands around every baseline. A bullish state triggers when price closes above the upper band. A bearish state triggers when price closes below the lower band.

Each baseline receives a score:

Pine Script®

The five scores are then averaged into the final output:

Pine Script®

A positive final score means most baselines are in bullish expansion. A negative score means most baselines are in bearish expansion.

3. Key Features

  1. Multi-baseline trend model using five different smoothing structures.
  2. Adaptive volatility bands based on residual MAD-style volatility.
  3. Final TPI-style score showing the average bullish or bearish state.
  4. Optional plotting for each baseline’s upper and lower bands.
  5. Candle coloring and histogram visualization for quick regime identification.


4. Use

Use it to identify when price is breaking away from several adaptive baseline models at the same time. A positive score suggests price is trading above the majority of its volatility-adjusted baselines, indicating bullish expansion. A negative score suggests price is trading below the majority of its baselines, indicating bearish expansion.

The individual baseline plots can be enabled when you want to inspect which smoothing model is driving the signal. When most baseline scores agree, the final score becomes more decisive. When the score is mixed or near zero, price is usually inside its adaptive fair-value zone and has not confirmed a clear directional regime.

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

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