Docs

ta.accdist

Track cumulative volume weighted by where each bar closed within its range.

itm
ta.accdist(bars)

Accumulation/Distribution line: the running total of ((close - low) - (high - close)) / (high - low) * volume, all read from bars. The multiplier is +1 when the bar closes on its high and -1 when it closes on its low. Accumulated from the first bar of the run with no session anchor, like ta.obv.

Parameters

A series parameter takes a value on every bar. A constant parameter must be known before the first bar, such as a number or an input.

NameKindTypeUnitDefaultRangeDescription
barsConstantbarsbarsna-Which bars to read: a declared series, or na for the chart's own.

Output

NameTypeUnit
valuenumber-

Warm-up and missing values

Warm-up
1 bar.
Missing values
na until a bar with both a non-zero high-low range and a volume has been seen. A bar this cannot be computed on leaves the running total where it was. It does not reset it and does not restart the accumulation. A zero-range bar contributes nothing because the multiplier is undefined there.

Example

itm
ta.accdist()
itm
plot(ta.accdist(), "Accumulation")