KennedyAdaptiveBaseline
- 지표
- Ryan Paul Kennedy
- 버전: 2.0
- 업데이트됨: 14 3월 2026
KAB: A Better Baseline.
KAB is an adaptive trend filter designed to track directional movement while actively suppressing abnormal volatility and noise. It behaves like a dynamic moving baseline that automatically adjusts responsiveness to changing market conditions.
Unlike fixed moving averages, KAB continuously modifies its internal smoothing rate based on volatility and directional efficiency. The result is a line that tightens during strong trends and stabilizes during unstable or chaotic price behaviour.
Core Concept
By scaling its gain using the relationship between short- and long-term volatility, KAB adapts to changing market conditions.
Optional Efficiency Ratio gating reduces adaptation during low-directionality periods, while the volatility-lock mechanism provides protection against extreme volatility expansions that can destabilize adaptive filters.
Mechanism
KAB is computed as an exponential moving average with a variable gain rather than a fixed smoothing constant. The adaptive gain is derived from a volatility ratio constructed from True Range smoothing.
Specifically, a short-term EMA of True Range is compared to a longer EMA of that same series:
EMA(TR, short) / EMA(EMA(TR, short), long)
This differs from a conventional ATR(short)/ATR(long) comparison. Instead of comparing two independent volatility estimates, the method compares the current short-term volatility estimate to a smoothed baseline of itself.
In practice this behaves less like a measure of raw volatility level and more like a measure of volatility expansion or contraction relative to its recent state.
Visual States
The indicator uses three colour states:
- Green – baseline rising
- Red – baseline falling
- Lock colour – volatility lock active
These states allow KAB to be used directly as a trend filter or signal engine.
Trading with KAB
This tool is intended for system integration, not for standalone signal generation. It acts as a baseline filter, ideal for:
- Trend-following bias confirmation
- Gating during uncertainty
- Anchoring mean-reversion logic
- Volatility-informed position sizing
That said, though it's not the intended use, KAB can be used as a standalone trading system.
Using simple long-only, binary entry-exit, 1% exposure backtests, KAB generated the following results on BTC's entire history:
- 153 trades
- 26.14% win rate
- 1.16% average trade return
- 407.60% compounded return
- 3.40 profit factor
- 6.97% max drawdown
(inclusive of 0.25% fee per trade and 1.5x ATR stops)
More information on this in KAB documentation on my GitHub.
Parameters
There are various parameter groups which can appear confusing to some users. The reason for this is because KAB contains several independent mechanisms. For transparency, I decided to expose them all.
However, KAB is shipped with default parameters and a recommendation to stay within a modest range of these values. These are not redundant knobs, but exposed internals, set to allow KAB to operate as intended.
Further, these are not arbitrary. Backtests repeatedly indicated that the most promising configuration (most promising return + drawdown) is the current KAB defaults.
If you still wish to experiment with KAB's parameters, the full guide is in KAB documentation on my GitHub.
Preferred Markets
Backtests indicate more promising performance on markets with clean, directional trend regimes (e.g. BTC or Gold) and large volatility expansion during trends (e.g. ETFs like TQQQ or UPRO). KAB can handle markets with higher volatility and, thus, more instability (e.g. XRP or SPY).
However, low/flat volatility or heavily mean-reverting assets (e.g. most FX pairs, short bond ETFs) will rarely generate the volatility-ratio expansion KAB needs, thus leading to far worse performance.
Python+PineScript versions available on Github too:
-
GitHub: github.com/DieArchitekt
-
ORCID: 0009-0006-3598-0581
Please leave a review.
License
MIT License – free for all use cases with attribution.

Very interesting and excellent made indicator! Thank you very much!