Accumulation Distribution Indicator: The Chaikin A/D Line

Written by Dominic Walsh · Published · Last updated

The accumulation distribution indicator asks one question per bar. Where in its range did the bar close? Near the high counts as buying. Near the low counts as selling. Volume then scales the answer.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Separate window (levels 0)
Plots 2: A/D line, A/D signal
Alerts popup, push notification, email, sound
Inputs 11

What the Accumulation Distribution Indicator draws on the chart

An aqua `A/D line` carries the running total in its own pane.

An orange red `A/D signal` averages it across `SignalPeriod` `21` bars.

A zero level marks where the window began.

`ShowSignalLine` removes the second line if you want the total alone.

  • A/D line: line, width 2
  • A/D signal: line, width 1
Accumulation distribution indicator A/D line and signal on the EURUSD H1 chart.
Accumulation distribution indicator A/D line and signal on the EURUSD H1 chart.

How the Accumulation Distribution Indicator calculates its values

The money flow multiplier

Each bar takes close minus low, less high minus close, over the range. That lands between minus one and one. A doji has no range, so the code writes zero.

Volume turns it into flow

Multiplying by tick volume gives money flow. Adding each bar to a running total draws the line. That is Chaikin’s method, unchanged.

The restart is what makes it readable

A raw sum drifts without bound and wrecks the pane scale. `NormalizeBars` `500` restarts the total at the oldest bar in view. So zero means the reading where the window starts.

How to read the signals

Direction matters far more than the value.

The line above its signal reads as buying pressure.

Below it reads as selling pressure.

Zero is a window edge, not a neutral point.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

`EnableAlerts` heads the chain and starts true, with `EnablePopup`. `EnablePushNotify` covers the phone. Mail goes through `EnableEmail`. `EnableSound` plays `SoundFile`. Those three ship off, and crossings report on closed bars.

Every Accumulation Distribution Indicator input

Core settings

Setting What it does Default
SignalPeriod Signal line period (SMA of the A/D line). Bars in the average drawn over the line, default `21`. 21
NormalizeBars Bars in the scanned window (sum restarts here). Bars in the window before the sum restarts, default `500`. 500

Display settings

Setting What it does Default
ShowSignalLine Plot the signal line. Plot the second line, default `true`. on
AdColor A/D line color. Colour of the running total, default `clrAqua`. aqua
SignalColor Signal line color. Colour of the average, default `clrOrangeRed`. orange red

Alert settings

Setting What it does Default
EnableAlerts Master alert switch. Head of the alert chain, default `true`. on
EnablePopup Popup alert. Terminal notice on a crossing, default `true`. on
EnablePushNotify Push notification to phone. Phone notice on a crossing, default `false`. off
EnableEmail Email alert. Mail notice on a crossing, default `false`. off
EnableSound Sound alert. Audible notice on a crossing, default `false`. off
SoundFile Sound file. alert.wav
Accumulation distribution indicator inputs panel with SignalPeriod and NormalizeBars.
Accumulation distribution indicator inputs panel with SignalPeriod and NormalizeBars.

Settings that fit your chart

Tick volume needs enough updates per bar. EURUSD H1 is the reference chart. There `NormalizeBars` `500` covers about three weeks. On M1 the counts get thin. Daily bars give the cleanest reading.

When the Accumulation Distribution Indicator fails

Forex tick volume counts updates, not size, and brokers differ.

A gap gets no special treatment, so it skews the multiplier.

The zero level moves as history scrolls past 500 bars.

Copy the compiled Accumulation Distribution Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Download the Accumulation Distribution Indicator for MT4 and MT5

The zip holds the compiled Accumulation Distribution Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.

Download this indicator free

Enter your email and the file is yours. You also get the full MT4 and MT5 library.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

What does NormalizeBars 500 prevent?

An unbounded sum. Left alone the total drifts so far that the pane flattens. Restarting at the oldest bar of a five-hundred-bar window keeps the shape readable and gives zero a meaning.

What does the A/D line do with a doji?

Because high equals low, so the range is zero and the division would fail. Writing zero says the bar had no location bias, which is what a flat bar tells you.

What does SignalPeriod 21 smooth?

The A/D line itself, not price. Twenty-one bars gives a line the total can cross. Shorten it and you get more crossings. Most of those sit inside the noise of the running sum.

Is the A/D line based on real volume?

On MetaTrader it uses tick volume, which counts price updates rather than contracts. Spot forex publishes no traded size. So every tool of this type uses the tick count instead, and brokers count it their own way.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Accumulation Distribution Indicator as one input. Always backtest before trading live.

Authoritative references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment