TrendPine Script v6Built-in Variable

ta.wadWilliams Accumulation/Distribution

Williams Accumulation/Distribution accumulates a price-based gain using the current high/low and previous close. Its formula does not use volume or measure cash flows.

TradingView language reference

Syntax

Syntax
ta.wad

Returns

series float

Remarks

Despite its name, WAD is price-based. Its cumulative level depends on the available history; divergence from price is an observation, not proof of accumulation by a particular investor or a coming reversal.

Code Examples

Pine Script v6 Example
//@version=6
indicator("Williams Accumulation/Distribution")
plot(ta.wad, color=color.yellow)

// the same on pine
f_wad() =>
    trueHigh = math.max(high, close[1])
    trueLow = math.min(low, close[1])
    mom = ta.change(close)
    gain = (mom > 0) ? close - trueLow : (mom < 0) ? close - trueHigh : 0
    ta.cum(gain)

plot(f_wad())

Trading Applications

Measure accumulation/distribution using true range concepts

Confirm trend direction with Williams A/D

Detect divergences for reversal signals

Compare with standard A/D for additional confirmation

Related Functions

Frequently Asked Questions

ta.wad is Williams Accumulation/Distribution: a cumulative line built from true high/low adjusted ranges and the direction of the close change.

Standard A/D (ta.accdist) uses a money-flow multiplier from close location in the bar. Williams A/D uses true high/low vs prior close and accumulates a per-bar price gain without multiplying by volume.

Compare its price-based cumulative path with price trends. A divergence can be a research condition, but WAD is not a volume line and does not guarantee a reversal.

Generate ta.wad Code with AI

Draft Pine Script using ta.wad with Pineify's AI Coding Agent, then review the arguments and test the result on your chart. Usage depends on your plan and available credits.