ta.wvad
Measure each bar's body as a share of its range, weighted by volume.
ta.wvad(bars)Williams Variable Accumulation/Distribution: (close - open) / (high - low) * volume, pointwise on the bar from bars. The body as a signed fraction of the range, weighted by volume. Sum it yourself: ta.cum(ta.wvad()) is the cumulative form.
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.
| Name | Kind | Type | Unit | Default | Range | Description |
|---|---|---|---|---|---|---|
bars | Constant | bars | bars | na | - | Which bars to read: a declared series, or na for the chart's own. |
Output
| Name | Type | Unit |
|---|---|---|
value | number | - |
Warm-up and missing values
- Warm-up
- 1 bar.
- Missing values
- na on a bar with a zero high-low range (a division by zero) or no usable volume, and na while
barshas no bar available.
Example
ta.wvad()plot(ta.cum(ta.wvad()), "Cumulative variable accumulation")