OPEN-SOURCE SCRIPT
Adaptive Baseline Suite | NAL

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
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.
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:
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:
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:
The five scores are then averaged into the final output:
A positive final score means most baselines are in bullish expansion. A negative score means most baselines are in bearish expansion.
3. Key Features
- Multi-baseline trend model using five different smoothing structures.
- Adaptive volatility bands based on residual MAD-style volatility.
- Final TPI-style score showing the average bullish or bearish state.
- Optional plotting for each baseline’s upper and lower bands.
- 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.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.