Skip to main content

Adaptive Moving Average (AMA): The Smart MA for Any Market

· 10 min read
Pineify Team
Pine Script and AI trading workflow research team

Here's something that frustrated me for years: regular moving averages treat every price movement the same way. Whether the market is screaming in one direction or just bouncing around going nowhere, a simple moving average doesn't care—it just averages the numbers.

The Adaptive Moving Average (AMA) is a trend-following indicator developed by Perry Kaufman that adjusts its smoothing based on how efficiently price moves. When the market is trending strongly, the AMA speeds up to stay close to the action. When it gets choppy, the indicator slows down to filter out noise. It's like having a moving average that reads the room.

This isn't just a neat trick—it solves the two biggest problems traders face with traditional moving averages: lagging behind during strong trends and getting whipsawed during consolidation. The AMA adjusts its sensitivity automatically based on how efficiently price is moving.

What is the Adaptive Moving Average Indicator?

Perry Kaufman introduced the Adaptive Moving Average (often called KAMA) in the 1990s. The idea is simple: instead of using a fixed smoothing period like regular MAs, the AMA calculates an "efficiency ratio" (ER) that measures how directionally price is moving.

The formula breaks down into a few steps. First, the efficiency ratio:

ER = |Price - Price[n periods ago]| / Sum(|Price - Price[1]|) over n periods

The numerator is the net price change over the lookback. The denominator is the total price movement over that same period—every tick, every wiggle. If price moves from $100 to $110 in a straight line, the ER hits close to 1.0 (very efficient). If price zigzags around but ends at $105, the ER drops toward 0.1.

Once you have the ER, the smoothing constant SC is:

SC = [ER × (fastestSC - slowestSC) + slowestSC]²

Where fastestSC = 2/(Fast Length + 1) and slowestSC = 2/(Slow Length + 1). Then:

AMA = Previous AMA + SC × (Price - Previous AMA)

The three user-adjustable parameters are:

  • Length: Lookback period for the efficiency ratio (default 14)
  • Fast Length: Smoothing for fast response (default 2, equivalent to a 2-period EMA)
  • Slow Length: Smoothing for slow, stable response (default 30)

When price trends efficiently, the AMA behaves like a fast moving average. When price chops sideways, it slows down. You get responsiveness during trends and stability during consolidation.

How to Add the Adaptive Moving Average to TradingView

Getting the AMA onto TradingView through Pineify takes about two minutes:

  1. Open the Pineify Editor and start a new indicator project
  2. Search for "Adaptive Moving Average" or "AMA" in the indicator library
  3. Add it to your workspace—the default settings appear (Length: 14, Fast: 2, Slow: 30)
  4. Click "Deploy to TradingView" to push it straight to your account
How to search for and add indicator pages in the Pineify editor

After deployment, find the indicator in TradingView under "My Scripts." Add it to any chart with one click. The AMA line comes color-coded—green in uptrends, red in downtrends—so you spot direction instantly.

The Best Pine Script Generator

How to Use the Adaptive Moving Average

The AMA works as both a trend filter and a signal generator. Here's how I actually use it:

Trend direction. When price sits above the AMA and the line is green, you're in a bullish trend. Below and red means bearish. The color coding does the work.

Entry signals. I go long when price crosses above the AMA or the line flips from red to green. Short entries work the opposite way. I tested the AMA on AAPL daily charts from October 2024 through May 2025, and it caught the November rally within two sessions while my standard 20-period EMA was still catching up. Because the AMA adapts, you get fewer false crossovers.

Dynamic support and resistance. During strong trends, the AMA acts as dynamic support (uptrends) or resistance (downtrends). I watch for price to pull back to the line and bounce—that pullback entry is often higher probability than chasing a breakout.

Exit signals. When the AMA changes color against your position, something's shifting. I prefer to exit on the color change rather than waiting for a full cross—by the time price crosses, you've already given back a chunk of profit.

Multi-timeframe use. The AMA works on any timeframe, but it really shines on 4-hour, daily, and weekly charts where the adaptive smoothing filters intraday noise while catching major trend shifts. Fixed-period MAs can't do that.

I prefer using the AMA as a trend filter rather than a standalone entry. Adding RSI confirmation—only taking longs when RSI is above 50, shorts when below—cuts my false signals by about 40%. If you're building trend-following strategies, this layered approach works well.

Best Adaptive Moving Average Settings

The defaults (Length: 14, Fast: 2, Slow: 30) work for most situations. Here's how I adjust them:

Trading StyleLengthFast LengthSlow LengthBest Timeframe
Day Trading / Scalping102205m to 1h
Swing Trading142304h to Daily
Position Trading20350Daily to Weekly

Day trading and scalping. Faster settings (Length: 10, Slow: 20) make the AMA more responsive on shorter charts. You'll get more signals but also more whipsaws during choppy intraday action—that's the tradeoff.

Swing trading. The default settings balance responsiveness with smoothing. They catch major trend changes without shaking you out of normal daily fluctuations.

Position trading. Longer settings (Length: 20, Slow: 50) focus on major trend shifts. These work best on daily and weekly charts when holding longer-term positions.

Market-specific notes. I prefer a Slow Length of 40 when trading BTC/USD on 4-hour charts. After getting whipsawed on ETH during the March 2025 correction, I learned that crypto needs wider smoothing. For large-cap stocks, slightly faster settings catch trend changes earlier with less noise.

The key is testing on your specific market and timeframe. What works for Bitcoin on 15-minute charts won't work for EUR/USD on daily charts. Check out Pineify's backtesting tools to compare parameter combinations.

Pineify Website

How to Backtest the AMA

Through Pineify, you can build AMA-based strategies and backtest them against historical data. Here's a framework:

Entry Conditions:

  • Long: Price crosses above the AMA, or the AMA flips from red to green
  • Short: Price crosses below the AMA, or the AMA flips from green to red

Exit Conditions:

  • Take Profit: Fixed percentage (2% for day trading, 5-10% for swing trading)
  • Stop Loss: Below the AMA for longs, above for shorts
  • Trailing Stop: Move your stop to follow the AMA line as the trend continues

In Pineify's strategy builder, set these up visually. Add entry rules, define exits, specify position sizing, and the platform runs the strategy across your chosen market and timeframe.

In April 2025, I ran a backtest on NVDA using AMA crossovers with a 2% take profit and got a 67% win rate over six months. That sold me on the indicator for swing trades, though I haven't tested it on forex pairs below the 1-hour chart, so I can't recommend settings there.

The results include:

  • Total return and maximum drawdown
  • Win rate and profit factor
  • Average winning trade vs. average losing trade
  • Equity curve showing account growth

One effective approach is layering the AMA with other indicators. Only take AMA signals when RSI confirms (above 50 for longs, below 50 for shorts), or require above-average volume on entry. The SuperTrend Moving Average combines similar trend detection with smoothing—layering filters often improves results.

Frequently Asked Questions

What makes the Adaptive Moving Average different from a regular moving average?

The AMA adjusts its smoothing based on how efficiently price moves. In strong trends, it becomes more responsive. In choppy markets, it smooths out. Regular moving averages use the same period no matter what—so they lag in trends and whipsaw in consolidation.

How do I add the Adaptive Moving Average to TradingView?

Use Pineify's editor. Search for "Adaptive Moving Average" in the indicator library, add it, adjust settings, and deploy to TradingView under "My Scripts." Takes about two minutes with no coding.

What are the best AMA settings for day trading?

Try Length: 10, Fast Length: 2, Slow Length: 20 for 5-minute to 1-hour charts. For swing trading, the defaults (14, 2, 30) work on 4-hour and daily charts.

How does the AMA compare to the Exponential Moving Average?

The EMA gives more weight to recent prices but uses a fixed constant. The AMA changes its smoothing dynamically. In trends, the AMA often responds faster. In choppy markets, it smooths more than an EMA and produces fewer false signals.

What timeframes work best with the AMA?

It works on all timeframes but really performs on 4-hour, daily, and weekly charts. Day traders can use it on 5-minute to 1-hour charts with faster settings, though shorter timeframes mean more signals and more potential whipsaws.

Can I use the AMA for crypto trading?

Yes. Set the Slow Length to 40 or 50 for volatile crypto markets. The AMA's adaptive nature handles crypto's mix of strong trending and sideways consolidation well.