Xu hướng TrendFilterAdaptive Có trong Builder

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
OverboughtOversoldCentreline 50Divergence

Minh họa — dữ liệu tổng hợp, không phải giá thực.

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. 1 Measure net travel against total travel
  2. 2 Turn that ratio into a smoothing constant
  3. 3 Step the line toward price by that amount
Hiển thị công thức & chi tiết tính toán

The Adaptive Moving Average is a recursive average whose smoothing constant is recomputed on every bar from how efficiently price has been moving:

  1. 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.
  2. Convert the two period bounds into smoothing constants — fastSC = 2 / (fast + 1) and slowSC = 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.
  3. 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.

Tín hiệu

Các tín hiệu có thể backtest của AMA — và điều kiện thị trường phù hợp với từng tín hiệu.

Price vs AMA

Sẵn sàng trong Builder
Điều kiện
Price closes above or below the adaptive line
Điều kiện tốt nhất
Established trends
Sử dụng thông thường
Gate another entry rule on the side of the trend the line reports

Fast / Slow AMA Cross

Sẵn sàng trong Builder
Điều kiện
A short-period AMA crosses a longer one
Điều kiện tốt nhất
Trending markets
Sử dụng thông thường
Trigger on a direction change with less range noise than a fixed-period pair

Pullback to the AMA

Sẵn sàng trong Builder
Điều kiện
Price returns to a rising AMA and holds above it
Điều kiện tốt nhất
Trend continuation
Sử dụng thông thường
Join a trend at a better price than the initial break

Waking Up From Flat

Logic nâng cao
Điều kiện
The line has been horizontal for a stretch and starts to slope
Điều kiện tốt nhất
Range-to-trend transition
Sử dụng thông thường
Detect the moment adaptation switches the line from quiet to responsive

Triển khai trong MT5

Những gì MetaTrader 5 thực sự tính và vẽ — cơ sở tham chiếu cho mọi quy tắc trên trang này.

Bộ đệm

Chỉ số Bộ đệm MT5 vẽ dưới dạng Chứa gì
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.

Ghi chú nền tảng

Hoạt động tốt nhất / sử dụng cẩn thận

Không có chỉ báo nào có lợi thế toàn diện. Đây là nơi AMA hỗ trợ — và nơi nó gây hiểu lầm.

Hoạt động tốt nhất

  • 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

Sử dụng cẩn thận

  • 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

Xây dựng chiến lược AMA

Kết nối tín hiệu vào quy tắc vào lệnh và thoát lệnh, sau đó xuất EA MT5 có thể biên dịch — không cần code.

  1. AMA (9 / 2 / 30) on Close
  2. Bid price compared against the AMA
  3. AO crosses above zero and price is above the AMA → Open Buy · SL 50 / TP 100
  4. AO crosses below zero and price is below the AMA → Open Sell

Kết hợp AMA với các chỉ báo khác

Một chỉ báo hiếm khi đứng một mình. Các cặp kết hợp này bù đắp điểm mù của AMA.

AMA + Awesome Oscillator

  1. Price above the AMA
  2. AO crosses above zero
  3. Buy
Lý do
Let the adaptive line decide whether a trend exists and let a momentum flip decide when to act, so a zero cross inside a flat market is ignored
Điều kiện tốt nhất
Trending
Xây dựng chiến lược này →

AMA + ATR

  1. Price above the AMA
  2. ATR sets stop distance
  3. Buy
Lý do
Take the direction from the adaptive line and the stop distance from current volatility, so the same rule survives calm and violent markets
Điều kiện tốt nhất
Any

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.

Mở Builder →

AMA + Moving Average

  1. AMA above SMA 9
  2. Price above both
  3. Buy
Lý do
Compare the adaptive line against a plain average of the same length to read whether the market is efficient or churning right now
Điều kiện tốt nhất
Range-to-trend transition

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.

Mở Builder →

AMA + FrAMA

  1. Price above the AMA
  2. FrAMA crosses above a fixed average
  3. Buy
Lý do
The other adaptive average on this site, and the comparison is about what each one measures rather than how hard it adapts. This page's line reads an efficiency ratio — net distance travelled against total distance — so it responds to how directional the move was. FrAMA reads the fractal dimension of the curve, so it responds to how jagged the path was. A market can cover a lot of ground by a very rough route, and that is precisely where the two lines part company
Điều kiện tốt nhất
Either regime

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.

Mở Builder →

Tham số

Giá trị ban đầu để xác nhận trên cặp tiền và khung thời gian của bạn — không phải cài đặt được đảm bảo.

Tham số Mặc định Khoảng thử nghiệm đề xuất Chức năng
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.

Cài đặt sẵn ban đầu

Reactive 5 / 2 / 30 Switches regime quickly, more false starts
Standard 9 / 2 / 30 The MT5 default and the Builder template's baseline
Regime 20 / 2 / 60 Describes the week rather than the swing

Ví dụ thị trường

Nơi AMA hoạt động, nơi nó thất bại, và bộ lọc thay đổi kết quả như thế nào.

Thành công

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.

Thất bại

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.

Đã lọc

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.