azguer

Adaptive Moving Average (AMA)

The Adaptive Moving Average (AMA), also known as Kaufman's Adaptive Moving Average (KAMA), is a trend-following indicator that adapts to market volatility. It was developed by Perry Kaufman in 1972 to improve upon traditional moving averages by making the smoothing period dynamic based on market conditions.

The AMA aims to:

- Smooth out price data to reduce noise, similar to other moving averages.
- Adapt its smoothing based on market volatility and trend strength.

Here's how the Adaptive Moving Average (AMA) works:

1. Calculate the Efficiency Ratio (ER): The AMA begins by calculating the Efficiency Ratio (ER), which measures the efficiency of a price trend. It's calculated as the absolute change in closing prices over a period (`PeriodEfficiencyRatio`) divided by the sum of absolute changes in closing prices over the same period. The ER value ranges from 0 to 1, with higher values indicating a stronger trend.

2. Determine the Smoothing Constant (sc): Using the ER, the AMA calculates the smoothing constant (sc). This constant ranges between a predefined slow EMA (exponential moving average) and fast EMA, depending on the ER.

3. Compute the AMA value: The AMA is then calculated using the smoothing constant (sc) and the previous AMA value, as well as the current close price. This allows the AMA to adapt its smoothing based on the market's volatility.

4. Plot the AMA: The AMA is plotted on the chart, usually as a line, which follows the price action more closely in periods of strong trends and provides more smoothing in periods of lower volatility.

Usage and Interpretation:

- The Adaptive Moving Average can be used to identify trends and potential entry and exit points.
- When the price is above the AMA line, it may indicate an uptrend, and when the price is below the AMA line, it may indicate a downtrend.
- Crossovers of the price with the AMA line can signal potential buy or sell opportunities.
- The adaptability of the AMA makes it more responsive in trending markets and smoother in range-bound markets, providing an advantage over traditional moving averages.

Parameters:

- Period for EfficiencyRatio calculation (`PeriodEfficiencyRatio`):** The period over which the Efficiency Ratio is calculated.
- Fast EMA Length (`fastLength`) and Slow EMA Length (`slowLength`):** These parameters define the range for the smoothing constant. A shorter fast length makes the AMA more responsive, while a longer slow length makes it smoother.

The AMA can be a useful tool in a trader's toolkit for analyzing market trends and making informed trading decisions. Adjusting the parameters can fine-tune the AMA for different trading styles and market conditions.
オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?