Adaptive Moving Average
AMA
The Adaptive Moving Average changes its own smoothing on every bar: it tracks price closely when a move is directional and flattens out when the market is just oscillating. It is the trend filter you reach for when a fixed-period average is either too slow in trends or too twitchy in ranges.
- Template periods
- 9 / 2 / 30
- Adaptation
- Efficiency ratio
- Scale
- Price
예시용 — 합성 데이터로, 실시간 호가가 아닙니다.
What the AMA tells you
The AMA answers the same question as any average — which way price has been going — but it decides for itself how much to smooth. It measures how much of the recent movement was net travel rather than back-and-forth, and speeds up or slows down accordingly. In a clean trend it behaves like a short average; in chop it goes almost flat and stops generating direction.
- Price above a rising AMA: the trend is up and the line is tracking it
- Price below a falling AMA: the trend is down
- A flat AMA is information, not a failure — it says the market went nowhere
- 1 Measure net travel against total travel
- 2 Turn that ratio into a smoothing constant
- 3 Step the line toward price by that amount
공식 및 계산 세부 정보 표시
The Adaptive Moving Average is a recursive average whose smoothing constant is recomputed on every bar from how efficiently price has been moving:
- Measure the efficiency ratio over the period N:
ER = |P − P₍ₙ₎| / Σ|Pᵢ − Pᵢ₋₁|. The numerator is net travel from N bars ago to now; the denominator is the total distance covered bar by bar. A straight-line move gives ER near 1; a market that ends where it started gives ER near 0. - Convert the two period bounds into smoothing constants —
fastSC = 2 / (fast + 1)andslowSC = 2 / (slow + 1)— and interpolate with the ratio, then square the result:SC = [ER × (fastSC − slowSC) + slowSC]². Squaring is what makes the quiet end genuinely flat rather than merely slow. - Step the line toward price by that amount:
AMA = AMAprev + SC × (P − AMAprev).
With the MT5 defaults of 9 / 2 / 30, the smoothing constant lives between roughly 0.004 and 0.44 — so the same indicator can behave like a very short average or a very long one depending on nothing but the shape of recent price action. That is the whole idea: the parameter you would otherwise have to guess and re-optimise per regime is being set by the market instead.
In MQL5 the call is iAMA(symbol, period, ama_period, fast_ma_period, slow_ma_period, ama_shift, applied_price) and it returns a handle to one buffer. Both the applied price and all three period arguments are real inputs; the efficiency ratio itself is internal and is not published as a buffer, so a rule that wants to read “how efficient is this market” has to reconstruct it rather than copy it.
신호
AMA이 제공하는 백테스트 가능한 뚜렷한 신호 — 및 각 신호에 적합한 시장 상황.
Fast / Slow AMA Cross
Builder로 구현 가능Pullback to the AMA
Builder로 구현 가능Waking Up From Flat
고급 로직MT5 구현
MetaTrader 5가 실제로 계산하고 그리는 내용 — 이 페이지의 모든 규칙이 기준으로 삼는 사양입니다.
버퍼
| 인덱스 | 버퍼 | MT5 표시 방식 | 저장 값 |
|---|---|---|---|
| 0 | MAIN_LINE | Line | The adaptive average itself, plotted on the price scale. iAMA publishes one buffer — the efficiency ratio that drives the adaptation is internal and is not exposed as a second buffer you can read. |
플랫폼 참고
가장 잘 작동하는 경우 / 주의해서 사용
어떤 지표도 보편적인 우위를 가지지 않습니다. AMA이 도움이 되는 곳 — 그리고 오해를 일으키는 곳.
가장 잘 작동하는 경우
- Markets that alternate between trending and ranging
- As a directional filter for a faster signal
- When a fixed-period average whipsaws in chop
- Higher timeframes where the regime is stable enough to read
주의해서 사용
- Very tight ranges, where the line barely moves at all
- As a standalone entry trigger
- Optimising all three periods at once
- Assuming adaptation removes lag — it only varies it
AMA 전략 구축
신호를 진입 및 청산 규칙에 연결하고, 컴파일 가능한 MT5 EA를 내보내세요 — 코드 없이.
- AMA (9 / 2 / 30) on Close
- Bid price compared against the AMA
- AO crosses above zero and price is above the AMA → Open Buy · SL 50 / TP 100
- AO crosses below zero and price is below the AMA → Open Sell
AMA을 다른 지표와 결합
하나의 지표만으로는 충분하지 않습니다. 이 조합들이 AMA의 취약점을 보완합니다.
AMA + Awesome Oscillator
- Price above the AMA
- AO crosses above zero
- Buy
AMA + ATR
- Price above the AMA
- ATR sets stop distance
- Buy
No single-flow template pairs the AMA with ATR. Start from AO + AMA and add an ATR node feeding a risk-based lot or stop node — the Fractal Breakout + ATR template shows that wiring.
Builder 열기 →AMA + Moving Average
- AMA above SMA 9
- Price above both
- Buy
No single-flow template pairs the AMA with a fixed-period moving average. Start from AO + AMA and add an MA node with a Compare against the AMA into the existing And gate.
Builder 열기 →AMA + FrAMA
- Price above the AMA
- FrAMA crosses above a fixed average
- Buy
No single-flow template pairs the two adaptive averages. Start from FrAMA vs Fixed EMA and add an AMA node with a Price node into a Compare, joined to the existing Cross with an And gate.
Builder 열기 →매개변수
자신의 통화쌍과 시간 프레임에서 검증할 초기값 — 보장된 설정이 아닙니다.
| 매개변수 | 기본값 | 권장 테스트 범위 | 기능 |
|---|---|---|---|
| Period | 9 | 5–30 | The window the efficiency ratio is measured over — how far back the indicator looks to decide whether the market is trending. Short windows switch the line between fast and slow more often; long windows commit to a regime. |
| Fast EMA period | 2 | 2–10 | The fast end of the smoothing range. It sets how responsive the line is allowed to become when travel is efficient. It is a bound on adaptation, not a second average of price. |
| Slow EMA period | 30 | 20–100 | The slow end of the smoothing range — how flat the line goes when the market is churning. Raising it makes quiet periods flatter and the contrast with trends sharper. |
| Applied price | Close | Close / Open / High / Low / Median / Typical / Weighted | Price series the average runs on. iAMA takes this as a real ENUM_APPLIED_PRICE argument, so Median and Typical are available if you want the bar's range folded in. |
| Shift | 0 | 0–3 | Which bar back the node reads the buffer from. Shift 1 evaluates against a fully closed bar. This is the node's read offset, not the indicator's own horizontal displacement. |
초기 프리셋
시장 예시
AMA이 작동하는 곳, 실패하는 곳, 그리고 필터가 결과를 어떻게 바꾸는지.
Flat line, then a clean lean
The AMA sits horizontal through a range and starts sloping as price breaks out. Because the line was flat, the crossing is unambiguous and it stays on one side for the whole leg.
Crossing a flat line repeatedly
In a tight range the line barely moves and price oscillates across it. Adaptation reduces the number of these crossings compared with a fixed average, but it does not remove them.
Momentum has to agree
With a momentum condition added, the same cluster of crossings is ignored until something actually flips — which is exactly what the AO + AMA template wires up.
FAQ
- How is the AMA different from an EMA?
- An EMA uses one fixed smoothing constant, so its lag is the same whatever the market is doing. The AMA recomputes its smoothing constant on every bar from an efficiency ratio — net movement divided by total movement over the period. When price travels in one direction the constant moves toward the fast bound and the line tracks closely; when price churns it moves toward the slow bound and the line flattens. Same output shape, variable responsiveness.
- Is the AMA the same as Kaufman's KAMA?
- Yes. MT5 ships Perry Kaufman's Adaptive Moving Average under the name AMA, and iAMA implements the standard KAMA construction with the efficiency ratio and the squared smoothing constant. The defaults of 9 / 2 / 30 are MT5's, and they match the values the Builder's AO + AMA template loads.
- What do the fast and slow periods actually change?
- They set the two ends of the range the adaptation moves between. Lowering the fast period lets the line become more aggressive in clean trends; raising the slow period makes it flatter in chop and therefore a stricter filter. Neither is a moving average of price in its own right, which is the most common misreading of the parameter names.
- Does adaptation remove the lag?
- No, it varies it. The AMA still only reports what price has already done — the difference is that it accepts more lag when lag is cheap (in a range, where you did not want signals anyway) and less when it is expensive (in a trend). Treating an adaptive average as a leading indicator inverts what it is for.
- Can I build an AMA EA without coding?
- Yes for the directional read. The AO + AMA template puts an AMA node against the Bid price with a Compare node and gates a momentum cross on it, exposing period, fast, slow and applied price as EA inputs. Reading the efficiency ratio directly, or detecting the moment the line wakes up from flat, are the exceptions and need custom MQL5.
- How should I validate settings before going live?
- Backtest on quality tick data first, then run the EA on a demo account before risking money. Three periods means a large search space, so optimise one at a time, hold back data the search never saw, and prefer settings that stay profitable across periods over the single in-sample peak — chasing that peak is overfitting the noise. No default or preset here is a performance promise; every value is a starting point to re-validate on your own pair and broker.