KAMA (Kaufman Adaptive Moving Average)
Indicator Description
KAMA (Kaufman Adaptive Moving Average) is an adaptive moving average that automatically adjusts its smoothing level according to market volatility, responding quickly in trending markets and remaining stable in ranging markets.
Function Information
- Function Name:
KAMA - Input Parameters:
#Kline: K-line data
- Parameter Settings:
timeperiod: Time period (default: 30)
- Output: Moving average value
Calculation Principle
KAMA is calculated using the following formula:
ER = |Price - Price(n)| / Sum(|Price - Price(1)|)
SC = (ER * (fastest - slowest) + slowest)^2
KAMA = KAMA(1) + SC * (Price - KAMA(1))
Where:
- ER is the efficiency ratio
- SC is the smoothing constant
- fastest and slowest are smoothing constants
- Price is the current price
- KAMA(1) is the KAMA value of the previous period
Usage Scenarios
- Trend identification and tracking
- Market volatility analysis
- Trading signal generation
- Support and resistance level judgment