Accumulation/Distribution
The Accumulation/Distribution line is a running total of each bar's volume, weighted by where the bar closed inside its own range. Closing near the high adds almost all of it, closing near the low subtracts almost all of it, closing in the middle adds nothing. Its level is arbitrary — what carries information is the slope, and where that slope disagrees with price.
- Parameters
- None
- Zero line
- None
- Volume used
- Tick
Ilustrativo — dados sintéticos, não uma cotação em tempo real.
What the A/D line tells you
Each bar gets a score between −1 and +1 for where it closed between its own high and low. Multiply that score by the bar's volume and add it to a running total. A day that closes on its high with heavy trading adds a lot; the same volume closing mid-range adds nothing at all. The result is a line that goes up while closes are being pushed toward highs and down while they are being pushed toward lows. Because it is a total, the number itself depends on where the chart's history begins and means nothing — the two things you can read are which way it is sloping and whether that agrees with price.
- Rising: closes are landing near highs, and volume is behind them
- Falling: closes are landing near lows
- Flat while price moves: the range is being covered but the closes are not committing
- 1 Score the bar: ((close − low) − (high − close)) / (high − low)
- 2 Multiply the score by the bar's volume
- 3 Add it to the running total
Mostrar a fórmula e detalhes de cálculo
The Accumulation/Distribution line is one score and one running total:
MFM = ((close − low) − (high − close)) / (high − low)A/D = A/D[1] + MFM × volume
The first line places the close between the bar’s own extremes: at the high it is +1, at the low −1, exactly in the middle 0. The second weights that by how much trading the bar took and adds it to everything before it. So the line rises while closes are being pushed toward highs on real participation and falls while they are being pushed toward lows.
In MQL5 the call is iAD(symbol, period, applied_volume) — three arguments, and there is no period among them. There is nothing to optimise inside the indicator, because there is no window: every bar in the loaded history contributes. There is one buffer, read at index 0, drawn with DRAW_LINE, and the reference says so plainly.
Two consequences shape every rule you can build.
The level is meaningless. The total starts wherever the chart’s history starts, so the absolute number belongs to your terminal’s download rather than to the market. It changes when more history arrives. What survives that is the shape and every difference between two bars, which is why the Builder’s template never references a value — only one shift against another.
There is no zero to cross. Most oscillators hand you an event: a crossing, a threshold, a sign change. A/D hands you a slope. The nearest thing to an event is disagreement with price, and the classic version of it — a price swing low against an A/D swing low — needs swing detection the node palette does not have. The template uses a fixed ten-bar lookback instead, which is the same idea coarsened enough to be buildable, and it is worth being clear that the two are not the same test.
Where A/D earns its place next to OBV is on bars that reversed inside themselves. A long red candle that fell hard and closed back near its high subtracts its entire volume from OBV and adds to A/D. Neither answer is wrong; they are answers to different questions, and A/D’s question — where did the closes land inside their own ranges — is the one the Chaikin Oscillator then differences into something with a zero.
Sinais
Os sinais distintos e testáveis que A/D oferece — e o regime adequado para cada um.
Slope Agreement
Pronto no BuilderBreakout Confirmation
Pronto no BuilderSwing-to-Swing Divergence
Lógica avançadaImplementação no MT5
O que o MetaTrader 5 realmente calcula e desenha — a referência para cada regra desta página.
Buffers
| Índice | Buffer | Desenhado no MT5 como | O que contém |
|---|---|---|---|
| 0 | MAIN_LINE | Line | The running total. One buffer, drawn with DRAW_LINE. The reference says so without qualification — 'It has only one buffer' — and the example on the same page copies index 0 and nothing else. |
Notas da plataforma
Funciona melhor / use com cuidado
Nenhum indicador tem vantagem universal. Veja onde A/D ajuda — e onde ele engana.
Funciona melhor
- Confirming that a breakout was accumulated into rather than drifted through
- Higher timeframes, where the close's position in the bar carries information
- As a second opinion on a move price alone has already suggested
- Instruments and sessions where the tick count actually reflects activity
Use com cuidado
- The level itself — it depends entirely on how much history your terminal has loaded
- Bars that gap; the score only measures the distance travelled inside the bar
- Comparing the value across symbols, timeframes or even brokers
- Doji-heavy quiet stretches, where a close in the middle of a tiny range adds nothing at any volume
Criar uma estratégia A/D
Conecte o sinal às regras de entrada e saída, depois exporte um EA MT5 compilável — sem código.
- A/D at the bar that just closed (shift 1) and at the eleventh bar back
- Close at the same two bars
- A/D higher AND price lower → Open Buy · SL 50 / TP 150
- A/D lower AND price higher → Open Sell
Combinar A/D com outros indicadores
Um indicador raramente funciona sozinho. Essas combinações cobrem os pontos cegos do A/D.
A/D + Chaikin Oscillator
- A/D above its value 10 bars ago
- Chaikin above zero
- Buy
No single-flow template pairs them. Start from A/D Divergence Dip Buy and add a Chaikin node with a Compare against a Constant of 0 into the existing AND gate.
Abrir o Builder →A/D + OBV
- A/D above its value 10 bars ago
- OBV above its value 10 bars ago
- Buy
No single-flow template pairs the two. Start from A/D Divergence Dip Buy and add an OBV node plus a second OBV node at shift 11, compared against each other the same way the A/D pair is.
Abrir o Builder →A/D + Bollinger Bands
- Price below the lower band
- A/D above its value 10 bars ago
- Buy
No single-flow template pairs them. Start from A/D Divergence Dip Buy and swap the Close-versus-Close pair for a Bollinger node and a Price node into a Compare.
Abrir o Builder →Parâmetros
Valores iniciais para validar no seu próprio par e timeframe — não são configurações garantidas.
| Parâmetro | Padrão | Faixa de teste sugerida | O que faz |
|---|---|---|---|
| Shift | 0 | 0–30 | Which bar back the node reads the total from. It is the only setting that changes what the node returns, and the template is built entirely out of it: since A/D has no level and no zero, every rule is one shift compared against another. |
| Timeframe | Current | M1–MN1 | Which chart the total is accumulated on. Changing it changes the series completely — an H1 A/D and an H4 A/D are different totals over the same market, not the same total sampled differently. |
| Applied volume | Tick volume | Tick or Real | Which volume series is accumulated. The Builder fixes this to tick volume, because real volume is unavailable on most retail forex feeds. It is the third and last argument iAD takes. |
| Period | Not applicable | — | There is none. The total has no averaging window; every bar since the start of the loaded history contributes. This is why the level is arbitrary and only differences are usable. |
Predefinições iniciais
Exemplos de mercado
Onde A/D funciona, onde falha e como um filtro muda o resultado.
Accumulation through a decline
Price grinds ten bars lower while each bar closes in the upper half of its range. The total finishes higher than it started, the entry fires, and the fixed target is reached on the rebound.
Divergence with nothing behind it
A quiet stretch where price slips a few pips and one heavy bar closing near its high lifts the total. Both conditions are met and the disagreement is a rounding error.
The decline the rule declines
Price falls ten bars and the closes land near the lows all the way down. The total falls with it, the divergence condition is not met, and no entry is taken — which is the difference between selling pressure and accumulation into weakness.
Indicadores relacionados
FAQ
- What is the difference between A/D and OBV?
- Both are running totals of the same tick volume; they differ in how a bar's volume is credited. OBV assigns the whole of it to one side based on whether the bar closed above or below the previous close. A/D splits it by where the close sat inside that bar's own high-low range, so a bar can contribute a fraction, and a bar that closes exactly mid-range contributes nothing at all. The practical difference shows up on reversal bars: a long red candle that closed well off its low subtracts everything from OBV and adds a little to A/D.
- What is the difference between A/D and the Chaikin Oscillator?
- The Chaikin Oscillator is this line differenced — a three-period average of A/D minus a ten-period one. That throws away the arbitrary level and leaves a series with a meaningful zero. If you want to know which way accumulation has gone over a stretch, read A/D. If you want an event you can act on, the oscillator crossing zero is one and A/D has none.
- What settings should I use?
- There are none. iAD takes a symbol, a timeframe and a volume type — no period, no applied price, no method. The only choices are which timeframe to accumulate on and what lookback you compare against, and the lookback lives in your rule rather than in the indicator.
- Why does my A/D value differ from another platform's?
- Almost certainly because of where the count started. The total accumulates from the oldest bar loaded, so a terminal with two years of history and one with ten will show different numbers for the same bar. Tick volume also varies between brokers. Neither affects the shape or any difference between two bars, which is all the indicator is usable for.
- Can I build an A/D EA without coding?
- Yes. The A/D Divergence Dip Buy template reads the line at the bar that just closed and at the eleventh bar back, reads the close at the same two bars, and requires the total to be higher while price is lower. The mirrored pair sells. There are no indicator parameters to set — only the lookback shifts and the stop distances.
- How should I validate settings before going live?
- Backtest on quality tick data, then run on a demo account before risking money. Two cautions specific to this one. Tick volume is broker-specific, so results carried over from someone else's data deserve extra scepticism. And the ten-bar lookback is a stand-in for swing-to-swing divergence, not the same thing — it fires far more often, so read the trade count before the profit and check whether a different lookback changes the answer entirely.
Artigos relacionados
Glossary