Accumulation Distribution Wave TradingView Indicator

The A/D line has tracked money flow since the 1970s. Also, accumulation Distribution Wave is an accumulation distribution indicator TradingView traders can use to turn that line into a readable regime. It subtracts a 21-period EMA from the running A/D total. The result is a wave. Above zero the script reads accumulation, below zero distribution. Indeed, a 9-EMA reclaim then times the entry inside that bias.

It is free and open source. Still, you can add it to any chart from the Accumulation Distribution Wave script page on TradingView, and the full Pine source is published there for you to read.

What Accumulation Distribution Wave plots on the price chart

The reclaim EMA plots straight on price. Thus, it turns green in accumulation, red in distribution and gray when the wave sits flat. The chart background carries a faint tint of the same regime color. Hence, signals print as three stacked circles – below the bar for a long, above it for a short – each carrying an ADW tag, and the script colors the signal bar too. The dashboard sits top right. Next, it reads out the wave regime, the raw wave value, any active divergence, the A/D total, ATR and the current position state.

How Accumulation Distribution Wave is built

Step one: build the A/D wave

Each bar produces a money flow multiplier. Then, the script takes close minus low, subtracts high minus close, then divides by the bar range. The result runs from plus one on a close at the high to minus one on a close at the low. Yet, multiply that by volume and you get the bar’s money flow. The script adds it to a running total, which is the classic A/D line.

The wave is the interesting part. Truly, the script takes a 21-bar EMA of the A/D line and subtracts it from the raw line. A positive wave means A/D climbs faster than its own average, so buyers press. Plainly, a negative wave means the reverse. Min Wave Slope sets a dead band around zero and defaults to 0.0, so any sign counts.

Step two: divergence and the entry trigger

Divergence runs over 20 bars. Also, the script compares the highest close in that window against the highest A/D reading. When price matches or exceeds its own 20-bar high while A/D falls short of its high, that flags bearish divergence. Indeed, the mirror flags bullish divergence at lows. The dashboard shows BULL, BEAR or a dash.

Entries need the wave and price to agree. In accumulation, the script waits for close to cross above the 9-period EMA. In distribution it waits for a cross below. Still, switch on Divergence-Only Mode and the matching divergence must appear as well, which cuts the signal count sharply.

Three final gates apply. The bar must close. At least 5 bars must have passed since the last signal. Thus, and the position state it tracks must not already sit in that direction, so the script alternates long and short rather than stacking entries. An optional session window can restrict signals to set hours.

How to read the signals

The background tint is your bias. Hence, green means the A/D line leads its own 21-EMA and buyers have been absorbing supply. Red means the opposite. Next, the circles then mark the moment price confirmed that bias by reclaiming the 9-EMA.

Divergence is the early warning. Then, when the dashboard reads BEAR while price sits at a 20-bar high, buying pressure is not keeping up with price. That does not turn the market on its own, yet it adds weight to the next distribution signal.

Watch the wave number itself. Yet, a wave hovering near zero means the regime is fragile and likely to flip. A large reading either way means the current bias has real separation behind it. Truly, the Last Signal counter tells you how stale the active call has become.

Every Accumulation Distribution Wave setting explained

The script exposes 15 inputs, grouped in the settings panel exactly as shown below. Defaults are the published values.

A/D

SettingWhat it doesDefaultRange
A/D Wave EMAA/D minus this EMA of A/D defines the accumulation/distribution wave.213 to 100
Divergence LookbackBars compared for price vs A/D divergence.205 to 80
Min Wave SlopeOptional minimum |wave| (in A/D units, 0 = any).0.00.0 to 5.0
ATR LengthSets the atr length used in the calculation.145 to 50

Signal Logic

SettingWhat it doesDefaultRange
Entry Reclaim EMAAfter the wave sets a bias, a close-cross of this EMA in that direction times the entry.92 to 50
Divergence-Only ModeOn = only fire when a price/A-D divergence is present in the bias direction.offon / off
Cooldown BarsSets the cooldown bars used in the calculation.51 to 40

Filters

SettingWhat it doesDefaultRange
Restrict to SessionToggles restrict to session on the chart.offon / off
Session WindowControls session window.0000-2400

Visual

SettingWhat it doesDefaultRange
Show DashboardToggles show dashboard on the chart.onon / off
Show 3-Layer GlowToggles show 3-layer glow on the chart.onon / off
Show Reclaim EMAToggles show reclaim ema on the chart.onon / off
Buy ColorColour used for buy color.#00d97e
Sell ColorColour used for sell color.#e5446d
Dashboard BGColour used for dashboard bg.color.new(#03130c, 14)

Alerts built into Accumulation Distribution Wave

The script ships 15 alert conditions. Plainly, open the alert dialog on the chart, pick the indicator as the condition source, then choose the event you want. Alerts fire on the close of the bar, so they follow the same confirmed-bar rule the on-chart signals use.

  • ADW Buy
  • ADW Sell
  • ADW Any Signal
  • ADW Accum On
  • ADW Distrib On
  • ADW Bull Div
  • ADW Bear Div
  • ADW EMA Up
  • ADW EMA Down
  • ADW Wave Zero
  • ADW Any Div
  • ADW Regime Flip

Other markets and timeframes

Every input here stays relative – an EMA of the A/D line, a 20-bar divergence window, a 9-EMA cross – so the numbers travel to stocks, futures, crypto and indices unchanged. Volume is the catch. The A/D line multiplies money flow by volume, so it needs a volume feed. Also, spot forex supplies only broker tick volume, not exchange volume, so the line measures activity rather than traded size. On exchange-traded symbols the reading is far more faithful.

Limitations worth knowing

The A/D line accumulates from the first bar your chart loads. Indeed, change the amount of history and the raw A/D number changes with it. The wave and the signals stay stable, since both work off differences, yet you should never read the A/D total as an absolute figure.

The divergence test is coarse. Still, it compares the current close against a 20-bar extreme rather than pairing swing points, so it can flag divergence during a broad consolidation. Treat it as context, not a signal on its own.

This is an entry timer with a bias filter. Thus, it carries no stop, no target and no sizing. The script computes ATR and shows it in the dashboard, yet never uses it inside the signal logic. Hence, position state also alternates, so the tool will not add to a winning direction.

Get Accumulation Distribution Wave on TradingView

Open Accumulation Distribution Wave on TradingView

If you also trade MetaTrader, the MT4 and MT5 indicator library is available below.

Get the complete indicator library

One email unlocks the full MT4 and MT5 indicator library. Next, this TradingView script stays free on TradingView – the button above adds it to your chart.

Using it alongside MetaTrader

Adding a script on TradingView takes one click, so there is no install step here. Then, if you want the same idea on MetaTrader, the MT4 and MT5 indicator installation guide walks through copying files into the data folder and attaching them to a chart. You can also browse the full MetaTrader indicator library, the MT4 indicators section, or the other free TradingView scripts published on this profile. For related chart tools see the MT5 indicators section and the forex trading strategies guides.

External references

Frequently asked questions

Does Accumulation Distribution Wave repaint?

No. Yet, both signals gate on barstate.isconfirmed, so a circle prints only after the bar closes and then stays fixed. The historical chart matches what a live session would have shown.

What separates the A/D line from the wave?

The A/D line is a running total of money flow. Truly, the wave is that line minus its own 21-period EMA. The line tells you the long-run balance. Plainly, the wave tells you whether that balance is improving or slipping right now.

Why did a clear EMA cross print no circle?

Four gates can block it. Also, the wave regime may have disagreed with the cross direction, the 5-bar cooldown may still run, the position state may already sit that way, or Divergence-Only Mode may be on without a matching divergence.

Does it work on markets without real volume?

It runs, though the reading weakens. Indeed, spot forex feeds tick volume instead of exchange volume, so the A/D line reflects how many price updates arrived rather than size traded. Stocks, futures and crypto give the calculation the volume data it was designed for.

How much should I rely on this indicator?

Treat it as one input, not a decision. Still, it is a chart analysis tool, not trading advice. Test it on your own markets and timeframes before relying on it. Results are not guaranteed; past performance is not indicative of future results.

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.

Leave a Comment