Volume weighted moving average
Average that weights each price by the volume traded at it.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| source | source | close | |
| volume | volume | tick | |
| period | int | 20 | 1 to 5000 |
Outputs
| Name | Type | Required | Description |
|---|---|---|---|
| vwma | value | Optional | color theme.accent, style line, width 1 |
- Warm-up
- period - 1 bars (19 at the defaults)
- Repaints
- No
- Parity
- None
Formula
VWMA[i] = sum(x[j] * v[j]) / sum(v[j]) over the last period bars
No value until period bars exist, or where the volume in the window adds to zero.