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.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。