OPEN-SOURCE SCRIPT
Kaufman Adaptive Moving Average + ART

**Kaufman Adaptive Moving Average (fixed TF) + ATR Volatility Bands**
This script is a Pine Script v5 extension of the original *Kaufman Adaptive Moving Average* by Alex Orekhov (everget).
It adds:
* a **fixed timeframe option** for KAMA
* a separate **ATR panel under the chart**
* **configurable ATR volatility levels** with dynamic coloring.
KAMA adapts its smoothing to market conditions: it speeds up in strong trends and slows down in choppy phases. Here, KAMA can be calculated on any timeframe (e.g. 1D) and overlaid on a lower-timeframe chart (e.g. 1H), so you can track higher-TF trend structure while trading intraday.
The ATR panel visualizes volatility in the same or a separate timeframe and highlights phases of high/low volatility based on user-defined thresholds.
---
### Features
**KAMA (on chart)**
* Standard KAMA parameters: `Length`, `Fast EMA Length`, `Slow EMA Length`, `Source`
* Input: **KAMA Timeframe**
* empty → uses chart timeframe
* any value (e.g. `60`, `240`, `D`, `W`) → calculates KAMA on that fixed TF and maps it to the chart
* Color-changing KAMA line:
* **green** when the selected-TF KAMA is rising
* **red** when it is falling
* Optional *Await Bar Confirmation* to avoid reacting to still-forming bars
* Built-in alert when the KAMA color changes (potential trend shift).
**ATR panel (separate window under the chart)**
* Own inputs: `Show ATR`, `ATR Length`
* **ATR Timeframe** input:
* empty → ATR uses the same TF as KAMA
* custom value → fully independent ATR timeframe
* Two user-defined volatility levels:
* `ATR High Vol Level` – threshold for **high volatility**
* `ATR Low Vol Level` – threshold for **low volatility**
* ATR line coloring:
* **red** when ATR > High Vol Level (high volatility regime)
* **green** when ATR < Low Vol Level (quiet market)
* **blue** in the normal range between the two levels.
---
### How to use
1. Add the script to your chart.
2. Choose a **KAMA Timeframe** (leave empty for chart TF, or set to a higher TF for multi-timeframe trend following).
3. Optionally set a different **ATR Timeframe** to monitor volatility on yet another TF.
4. Adjust `ATR High Vol Level` and `ATR Low Vol Level` to match the instrument and timeframe you trade.
5. Use:
* the **KAMA color changes** as trend / regime signals, and
* the **ATR colors & levels** to quickly see whether you’re trading in a low-, normal- or high-volatility environment.
This combination is designed to keep the chart itself clean (only KAMA on price) while giving you a dedicated volatility dashboard directly underneath.
This script is a Pine Script v5 extension of the original *Kaufman Adaptive Moving Average* by Alex Orekhov (everget).
It adds:
* a **fixed timeframe option** for KAMA
* a separate **ATR panel under the chart**
* **configurable ATR volatility levels** with dynamic coloring.
KAMA adapts its smoothing to market conditions: it speeds up in strong trends and slows down in choppy phases. Here, KAMA can be calculated on any timeframe (e.g. 1D) and overlaid on a lower-timeframe chart (e.g. 1H), so you can track higher-TF trend structure while trading intraday.
The ATR panel visualizes volatility in the same or a separate timeframe and highlights phases of high/low volatility based on user-defined thresholds.
---
### Features
**KAMA (on chart)**
* Standard KAMA parameters: `Length`, `Fast EMA Length`, `Slow EMA Length`, `Source`
* Input: **KAMA Timeframe**
* empty → uses chart timeframe
* any value (e.g. `60`, `240`, `D`, `W`) → calculates KAMA on that fixed TF and maps it to the chart
* Color-changing KAMA line:
* **green** when the selected-TF KAMA is rising
* **red** when it is falling
* Optional *Await Bar Confirmation* to avoid reacting to still-forming bars
* Built-in alert when the KAMA color changes (potential trend shift).
**ATR panel (separate window under the chart)**
* Own inputs: `Show ATR`, `ATR Length`
* **ATR Timeframe** input:
* empty → ATR uses the same TF as KAMA
* custom value → fully independent ATR timeframe
* Two user-defined volatility levels:
* `ATR High Vol Level` – threshold for **high volatility**
* `ATR Low Vol Level` – threshold for **low volatility**
* ATR line coloring:
* **red** when ATR > High Vol Level (high volatility regime)
* **green** when ATR < Low Vol Level (quiet market)
* **blue** in the normal range between the two levels.
---
### How to use
1. Add the script to your chart.
2. Choose a **KAMA Timeframe** (leave empty for chart TF, or set to a higher TF for multi-timeframe trend following).
3. Optionally set a different **ATR Timeframe** to monitor volatility on yet another TF.
4. Adjust `ATR High Vol Level` and `ATR Low Vol Level` to match the instrument and timeframe you trade.
5. Use:
* the **KAMA color changes** as trend / regime signals, and
* the **ATR colors & levels** to quickly see whether you’re trading in a low-, normal- or high-volatility environment.
This combination is designed to keep the chart itself clean (only KAMA on price) while giving you a dedicated volatility dashboard directly underneath.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.