OPEN-SOURCE SCRIPT
Updated ALP AT + KAMA Crossover

This indicator is a powerful combination of two adaptive trend-following concepts: the AlphaTrend by Kivanc Ozbilgic and the Kaufman's Adaptive Moving Average (KAMA), often credited to Perry Kaufman (with the specific implementation based on HPotter's interpretation of KAMA).
The primary goal of this indicator is to provide a robust trend detection and dynamic support/resistance system, adapting to market volatility.
How it Works:
AlphaTrend Component: The green/red line is the AlphaTrend. It dynamically adjusts to market volatility (using ATR) and momentum (using MFI or RSI, configurable). It provides faster signals for trend changes.
KAMA Component: The black line is the Kaufman's Adaptive Moving Average. KAMA is designed to filter out market noise during choppy periods and follow the price closely during trending periods, making it a smoother and more reliable long-term trend indicator.
Color-Coded Trend Zones: The AlphaTrend line is color-coded to visually represent the current market condition based on the price's position relative to both AlphaTrend and KAMA:
Strong Uptrend (Lime Green): Price is above both AlphaTrend and KAMA.
Strong Downtrend (Red): Price is below both AlphaTrend and KAMA.
Uptrend Uncertainty (Orange): Price is above KAMA but below AlphaTrend (suggests consolidation or weakening uptrend).
Downtrend Uncertainty (Blue): Price is below KAMA but above AlphaTrend (suggests consolidation or strengthening downtrend within a downtrend).
Gray: Default/unclassified state.
The underlying logic is based on:
Bullish Crossover (Potential Buy Signal): When the AlphaTrend line crosses above the KAMA line.
Bearish Crossover (Potential Sell Signal): When the AlphaTrend line crosses below the KAMA line.
These crossovers indicate a shift in the adaptive trend momentum.
Customization:
Users can customize various parameters in the indicator's settings, including:
AlphaTrend Multiplier and Common Period.
KAMA Lengths and Alpha values.
All the color codes for different trend zones and lines, allowing for full personalization of the visual output.
Disclaimer:
This indicator is for informational and educational purposes only and should not be considered as financial advice. Trading involves substantial risk, and past performance is not indicative of future results. Always conduct your own thorough research and analysis before making any trading or investment decisions. This indicator is NOT a buy/sell/hold recommendation. Use it as a tool to aid your analysis, not as a sole basis for your trades.
The primary goal of this indicator is to provide a robust trend detection and dynamic support/resistance system, adapting to market volatility.
How it Works:
AlphaTrend Component: The green/red line is the AlphaTrend. It dynamically adjusts to market volatility (using ATR) and momentum (using MFI or RSI, configurable). It provides faster signals for trend changes.
KAMA Component: The black line is the Kaufman's Adaptive Moving Average. KAMA is designed to filter out market noise during choppy periods and follow the price closely during trending periods, making it a smoother and more reliable long-term trend indicator.
Color-Coded Trend Zones: The AlphaTrend line is color-coded to visually represent the current market condition based on the price's position relative to both AlphaTrend and KAMA:
Strong Uptrend (Lime Green): Price is above both AlphaTrend and KAMA.
Strong Downtrend (Red): Price is below both AlphaTrend and KAMA.
Uptrend Uncertainty (Orange): Price is above KAMA but below AlphaTrend (suggests consolidation or weakening uptrend).
Downtrend Uncertainty (Blue): Price is below KAMA but above AlphaTrend (suggests consolidation or strengthening downtrend within a downtrend).
Gray: Default/unclassified state.
The underlying logic is based on:
Bullish Crossover (Potential Buy Signal): When the AlphaTrend line crosses above the KAMA line.
Bearish Crossover (Potential Sell Signal): When the AlphaTrend line crosses below the KAMA line.
These crossovers indicate a shift in the adaptive trend momentum.
Customization:
Users can customize various parameters in the indicator's settings, including:
AlphaTrend Multiplier and Common Period.
KAMA Lengths and Alpha values.
All the color codes for different trend zones and lines, allowing for full personalization of the visual output.
Disclaimer:
This indicator is for informational and educational purposes only and should not be considered as financial advice. Trading involves substantial risk, and past performance is not indicative of future results. Always conduct your own thorough research and analysis before making any trading or investment decisions. This indicator is NOT a buy/sell/hold recommendation. Use it as a tool to aid your analysis, not as a sole basis for your trades.
Release Notes
ALP AT + KAMA Crossover (with EMA 100/200) – Adaptive Trend Detection & Confluence SystemDescription:
This indicator is an original and practical tool for adaptive trend detection, bringing together three advanced concepts in one unique system:
AlphaTrend (by Kivanc Ozbilgic):
Uses ATR bands and a momentum filter (MFI or RSI) to adaptively track price trends and filter out noise from weak moves or market chop.
Kaufman’s Adaptive Moving Average (KAMA, HPotter method):
Provides an adaptive smoothing line that accelerates in trending conditions and slows during consolidations, helping traders to visually distinguish between “real trends” and sideways markets.
Classic EMA 100 & EMA 200:
Included as optional overlays for long-term trend direction, structure, and dynamic support/resistance. These are widely used by professional traders for confirming big-picture bias.
What Makes This Script Original and Useful?
While AlphaTrend, KAMA, and EMA are each known individually, this script’s originality lies in their integration, combined with a unique color-coding logic that instantly shows trend strength, uncertainty, and reversal zones on any asset and timeframe.
The system helps traders quickly filter out sideways markets, avoid whipsaws, and visually spot high-probability trend entries or exits.
How Does It Work?
AlphaTrend Line is colored according to price’s relationship to both AlphaTrend and KAMA:
Lime Green: Price above both AlphaTrend and KAMA (strong uptrend).
Red: Price below both (strong downtrend).
Orange: Price above KAMA, below AlphaTrend (possible consolidation, weakening uptrend).
Blue: Price below KAMA, above AlphaTrend (potential reversal or bear trap).
Gray: Neutral/unclassified.
KAMA Line tracks the adaptive “true trend” and reacts to changing volatility.
EMA 100/200 Lines serve as classic long-term trend filters, with customizable colors.
Bullish Signal: AlphaTrend crosses above KAMA (and price above both) suggests uptrend strength.
Bearish Signal: AlphaTrend crosses below KAMA (and price below both) signals downtrend acceleration.
How to Use:
Best For: Swing, trend-following, or long-term traders needing clear, adaptive, and multi-layered trend structure on the chart.
Trading Logic:
Go long: Price and AlphaTrend above KAMA, especially above EMA 100/200.
Go short: Price and AlphaTrend below KAMA and below EMA 100/200.
Avoid or reduce risk: When color is orange or blue (uncertainty zones).
Customization: All input parameters (periods, color, visibility of EMAs) can be adjusted in settings.
Assets/Timeframes: Works for all markets and on any timeframe.
Calculation Notes:
AlphaTrend: Uses ATR and MFI/RSI for adaptive bands and trend filtering.
KAMA: HPotter implementation for responsive trend-following.
EMAs: Standard 100/200-period exponential averages for long-term bias.
Disclaimer:
**This script is provided for informational and educational purposes only. Nothing in this script or its description should be construed as financial, investment, or trading advice, nor as a recommendation to buy, sell, or hold any financial instrument or security. Past performance does not guarantee future results.
The calculations, visualizations, and logic presented are based on historical price data and do not take into account individual risk tolerance, financial circumstances, or trading objectives. All trading and investment decisions are the sole responsibility of the user.
Use of this script does not ensure profits or prevent losses. Trading in financial markets involves substantial risk, including the risk of losing all or a substantial portion of your capital. You should always conduct your own due diligence and seek advice from a qualified financial advisor before making investment or trading decisions.
By using this script, you acknowledge and accept full responsibility for your trading and investment decisions. Test thoroughly in a simulated environment before applying to live accounts.
USE AT YOUR OWN RISK.
If you do not agree with these terms, do not use this script.**
Credits:
AlphaTrend: Kivanc Ozbilgic
KAMA: Perry Kaufman, HPotter adaptation
Release Notes
ALP AT + KAMA Crossover (with EMA 100/200) – Adaptive Trend Detection & Confluence SystemDescription:
This indicator is an original and practical tool for adaptive trend detection, bringing together three advanced concepts in one unique system:
AlphaTrend (by Kivanc Ozbilgic):
Uses ATR bands and a momentum filter (MFI or RSI) to adaptively track price trends and filter out noise from weak moves or market chop.
Kaufman’s Adaptive Moving Average (KAMA, HPotter method):
Provides an adaptive smoothing line that accelerates in trending conditions and slows during consolidations, helping traders to visually distinguish between “real trends” and sideways markets.
Classic EMA 100 & EMA 200:
Included as optional overlays for long-term trend direction, structure, and dynamic support/resistance. These are widely used by professional traders for confirming big-picture bias.
What Makes This Script Original and Useful?
While AlphaTrend, KAMA, and EMA are each known individually, this script’s originality lies in their integration, combined with a unique color-coding logic that instantly shows trend strength, uncertainty, and reversal zones on any asset and timeframe.
The system helps traders quickly filter out sideways markets, avoid whipsaws, and visually spot high-probability trend entries or exits.
How Does It Work?
AlphaTrend Line is colored according to price’s relationship to both AlphaTrend and KAMA:
Lime Green: Price above both AlphaTrend and KAMA (strong uptrend).
Red: Price below both (strong downtrend).
Orange: Price above KAMA, below AlphaTrend (possible consolidation, weakening uptrend).
Blue: Price below KAMA, above AlphaTrend (potential reversal or bear trap).
Gray: Neutral/unclassified.
KAMA Line tracks the adaptive “true trend” and reacts to changing volatility.
EMA 100/200 Lines serve as classic long-term trend filters, with customizable colors.
Bullish Signal: AlphaTrend crosses above KAMA (and price above both) suggests uptrend strength.
Bearish Signal: AlphaTrend crosses below KAMA (and price below both) signals downtrend acceleration.
How to Use:
Best For: Swing, trend-following, or long-term traders needing clear, adaptive, and multi-layered trend structure on the chart.
Trading Logic:
Go long: Price and AlphaTrend above KAMA, especially above EMA 100/200.
Go short: Price and AlphaTrend below KAMA and below EMA 100/200.
Avoid or reduce risk: When color is orange or blue (uncertainty zones).
Customization: All input parameters (periods, color, visibility of EMAs) can be adjusted in settings.
Assets/Timeframes: Works for all markets and on any timeframe.
Calculation Notes:
AlphaTrend: Uses ATR and MFI/RSI for adaptive bands and trend filtering.
KAMA: HPotter implementation for responsive trend-following.
EMAs: Standard 100/200-period exponential averages for long-term bias.
Disclaimer:
**This script is provided for informational and educational purposes only. Nothing in this script or its description should be construed as financial, investment, or trading advice, nor as a recommendation to buy, sell, or hold any financial instrument or security. Past performance does not guarantee future results.
The calculations, visualizations, and logic presented are based on historical price data and do not take into account individual risk tolerance, financial circumstances, or trading objectives. All trading and investment decisions are the sole responsibility of the user.
Use of this script does not ensure profits or prevent losses. Trading in financial markets involves substantial risk, including the risk of losing all or a substantial portion of your capital. You should always conduct your own due diligence and seek advice from a qualified financial advisor before making investment or trading decisions.
By using this script, you acknowledge and accept full responsibility for your trading and investment decisions. Test thoroughly in a simulated environment before applying to live accounts.
USE AT YOUR OWN RISK.
If you do not agree with these terms, do not use this script.**
Credits:
AlphaTrend: Kivanc Ozbilgic
KAMA: Perry Kaufman, HPotter adaptation
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.