Williams' Accumulation/Distribution (WAD)
Summary
Williams' Accumulation/Distribution: a cumulative line meant to expose whether a security is quietly under accumulation (informed buying) or distribution (informed selling) beneath the surface of price. Larry Williams built it to catch that shift before price confirms it — traders watch for the line to diverge from price, since a line that keeps rising while price stalls or falls points to accumulation, and one that stalls while price pushes to a new high points to distribution.
It consumes no volume. Larry Williams' original multiplies each move by that bar's volume; Steven Achelis published the modification that drops the multiplier (Technical Analysis from A to Z, 2nd ed., p.368), and the industry kept Williams' name on that no-volume form. That industry-wide decision is enough for TA-Lib to ship the same form under the same name. What remains once the multiplier is dropped is a signed close-to-close move measured on the true range, so it is grouped as a momentum indicator, not a volume one.
Chart
Chart metadata i
Outputs
outReal:line·zero·positive·negative
Formula
For each bar t:
TRH_t = max(close_{t-1}, high_t)
TRL_t = min(close_{t-1}, low_t)
if close_t > close_{t-1} then AD_t = close_t - TRL_t
if close_t < close_{t-1} then AD_t = close_t - TRH_t
otherwise AD_t = 0
WAD_t = WAD_{t-1} + AD_t
The first bar of the requested range has no previous close, so the first output is always AD_t = 0. A different startIdx shifts WAD's whole line by a constant.
Inputs
inHigh— High price of each barinLow— Low price of each barinClose— Close price of each bar
Outputs
outReal— Cumulative accumulation/distribution
Properties
Numerical Stability: Path-Dependent
| ☐ Overlap Input |
| ✅ Independent Y-Axis i |
| ☐ Candlestick |
| ☐ Display Shift |
| ☐ Can Output NaN or ±Inf |
| ☐ Identity at Period 1 |
| ☐ Uses Transcendental |
| ☐ Input Must Be Positive |
Example
#include <stdio.h>
#include <ta_libc.h>
int n = 252;
double high[252]; /* your data, oldest first */
double low[252]; /* your data, oldest first */
double close[252]; /* your data, oldest first */
double out[252];
int outBegIdx, outNBElement;
TA_Initialize();
TA_WAD( 0, n - 1, high, low, close, &outBegIdx, &outNBElement, out );
printf( "%d values from bar %d: [%.4f, ..., %.4f]\n", outNBElement, outBegIdx, out[0], out[outNBElement - 1] );use ta_lib::Core;
let high = vec![0.0; 252]; // your data, oldest first
let low = vec![0.0; 252]; // your data, oldest first
let close = vec![0.0; 252]; // your data, oldest first
let mut out = vec![0.0; 252];
let core = Core::new();
let range = core.wad(0, high.len() - 1, &high, &low, &close, &mut out)?;
println!("{} values from bar {}: [{:.4}, ..., {:.4}]", range.count, range.beg_idx, out[0], out[range.count - 1]);import io.github.talib.Core;
import io.github.talib.OutRange;
import java.util.Locale;
double[] high = new double[252]; // your data, oldest first
double[] low = new double[252]; // your data, oldest first
double[] close = new double[252]; // your data, oldest first
double[] out = new double[252];
Core core = Core.DEFAULT;
OutRange r = core.wad(0, high.length - 1, high, low, close, out);
System.out.printf(Locale.ROOT, "%d values from bar %d: [%.4f, ..., %.4f]%n", r.count(), r.begIdx(), out[0], out[r.count() - 1]);using System;
using TALib;
var high = new double[252]; // your data, oldest first
var low = new double[252]; // your data, oldest first
var close = new double[252]; // your data, oldest first
var outReal = new double[252];
var core = Core.Default;
OutRange r = core.Wad(0, high.Length - 1, high, low, close, outReal);
Console.WriteLine(FormattableString.Invariant($"{r.Count} values from bar {r.BegIdx}: [{outReal[0]:F4}, ..., {outReal[r.Count - 1]:F4}]"));import { wad } from 'ta-lib';
const high = new Float64Array(252); // your data, oldest first
const low = new Float64Array(252); // your data, oldest first
const close = new Float64Array(252); // your data, oldest first
const { begIdx, values } = wad({ high, low, close });
console.log(values.length + ' values from bar ' + begIdx + ': [' + values[0].toFixed(4) + ', ..., ' + values[values.length - 1].toFixed(4) + ']');import (
"fmt"
"log"
talib "ta-lib.github.io/go"
)
high := make([]float64, 252) // your data, oldest first
low := make([]float64, 252) // your data, oldest first
close := make([]float64, 252) // your data, oldest first
out := make([]float64, 252)
core := talib.NewCore()
r, err := core.WAD(0, len(high)-1, high, low, close, out)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%d values from bar %d: [%.4f, ..., %.4f]\n", r.NBElement, r.BegIdx, out[0], out[r.NBElement-1])Implementation
Added in 0.8.1 (ta-lib-python 0.8.1).
TA-Lib Definition: wad.c · wad.yaml
| Native | File |
|---|---|
| C | ta_WAD.c |
| Rust | wad.rs |
| Java | Core_WAD.java |
| C# | Core_WAD.cs |
| TypeScript | wad.ts |
| Go | wad.go |
Python: talib.WAD (ta-lib-python 0.8.1 or later), see ta-lib-python.
TA-Lib is also available for R and more using a wrapper.
See Also
References
- Larry Williams is the originator; Steven Achelis, Technical Analysis from A to Z, 2nd edition, page 368 publishes the no-volume form this ships, with the worked 12-bar example pinned in the test suite.
- IncredibleCharts, Williams Accumulation Distribution — Williams' volume-weighted original,
AD = Price Move × Volumeover the same true-range price move. - IncredibleCharts, Williams Accumulate Distribute — the Achelis form under its disambiguating name, "not a volume indicator despite the name".