OPEN-SOURCE SCRIPT
Ultra Pulse KAMA

## Overview
TX Ultra Pulse KAMA is a trend-following system built upon the Kaufman Adaptive Moving Average (KAMA) architecture. Unlike standard Moving Averages that lag significantly during trend reversals, this system uses an Efficiency Ratio (ER) to automatically adjust its sensitivity based on market noise.
## How It Works (The Logic)
This script does not just plot a KAMA line; it builds a volatility-gated signal system around it:
1. The Adaptive Core (KAMA)
The engine calculates the "Efficiency Ratio" (ER) of price action.
High ER (Clean Trend): The Moving Average speeds up to capture the move.
Low ER (Choppy/Sideways): The Moving Average stops moving (flattens out) to prevent false signals.
2. Volatility Gating (The Trigger)
Instead of simple crossovers, this script analyzes the Rate of Change (Delta) of the KAMA line itself.
It calculates the Standard Deviation (stdev) of the KAMA's movement over a lookback period.
Signal Generation: A signal is only triggered if the KAMA's momentum exceeds a specific volatility threshold (Deviation). This filters out weak breakouts that lack genuine conviction.
3. Trend Filter (The Cloud)
A secondary filter layer uses two Exponential Moving Averages (Fast & Slow) to determine the macro regime.
Uptrend: Price > Slow EMA & Fast EMA > Slow EMA.
Downtrend: Price < Slow EMA & Fast EMA < Slow EMA.
If the "Trend Filter" option is ON, Counter-trend signals are strictly suppressed.
## Settings & Modes
To make the math accessible, the script includes 3 preset modes that adjust the sensitivity of the Volatility Gate:
Aggressive (Scalp): Tighter deviation settings. Reacts faster but captures more noise. Best for 1m-5m charts.
Normal (Balanced): The standard deviation setting optimized for 15m-1H charts.
Swing (Safe): Requires a significant volatility expansion to trigger. Best for 4H-Daily charts.
## Features
Non-Repainting Heikin Ashi: An option to calculate KAMA based on Heikin Ashi source data without repainting issues (using barmerge.lookahead_off).
Visual Confirmation: Signals can be set to appear only after the bar closes to ensure validity.
Regime Coloring: Candles are colored Aqua (Bullish Trend) or Yellow (Bearish Trend) to visualize the filter state.
## Disclaimer
This tool is for educational and analytical purposes only. Technical indicators are lagging by nature and should be used as part of a comprehensive risk management strategy. Past performance does not guarantee future results.
TX Ultra Pulse KAMA is a trend-following system built upon the Kaufman Adaptive Moving Average (KAMA) architecture. Unlike standard Moving Averages that lag significantly during trend reversals, this system uses an Efficiency Ratio (ER) to automatically adjust its sensitivity based on market noise.
## How It Works (The Logic)
This script does not just plot a KAMA line; it builds a volatility-gated signal system around it:
1. The Adaptive Core (KAMA)
The engine calculates the "Efficiency Ratio" (ER) of price action.
High ER (Clean Trend): The Moving Average speeds up to capture the move.
Low ER (Choppy/Sideways): The Moving Average stops moving (flattens out) to prevent false signals.
2. Volatility Gating (The Trigger)
Instead of simple crossovers, this script analyzes the Rate of Change (Delta) of the KAMA line itself.
It calculates the Standard Deviation (stdev) of the KAMA's movement over a lookback period.
Signal Generation: A signal is only triggered if the KAMA's momentum exceeds a specific volatility threshold (Deviation). This filters out weak breakouts that lack genuine conviction.
3. Trend Filter (The Cloud)
A secondary filter layer uses two Exponential Moving Averages (Fast & Slow) to determine the macro regime.
Uptrend: Price > Slow EMA & Fast EMA > Slow EMA.
Downtrend: Price < Slow EMA & Fast EMA < Slow EMA.
If the "Trend Filter" option is ON, Counter-trend signals are strictly suppressed.
## Settings & Modes
To make the math accessible, the script includes 3 preset modes that adjust the sensitivity of the Volatility Gate:
Aggressive (Scalp): Tighter deviation settings. Reacts faster but captures more noise. Best for 1m-5m charts.
Normal (Balanced): The standard deviation setting optimized for 15m-1H charts.
Swing (Safe): Requires a significant volatility expansion to trigger. Best for 4H-Daily charts.
## Features
Non-Repainting Heikin Ashi: An option to calculate KAMA based on Heikin Ashi source data without repainting issues (using barmerge.lookahead_off).
Visual Confirmation: Signals can be set to appear only after the bar closes to ensure validity.
Regime Coloring: Candles are colored Aqua (Bullish Trend) or Yellow (Bearish Trend) to visualize the filter state.
## Disclaimer
This tool is for educational and analytical purposes only. Technical indicators are lagging by nature and should be used as part of a comprehensive risk management strategy. Past performance does not guarantee future results.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。