vwap
forge.ta.vwap(source: ArrayLike,volume: ArrayLike,time_open: ArrayLike,anchor: str = 'session',anchor_time: str = '',band_mult: float = 1.0,day_boundary: str = '17:00 America/New_York') -> dict[str, np.ndarray]Volume-weighted average price from each anchor, with bands at its weighted deviation.
Parameters
| Name | Type | Default |
|---|---|---|
| source | ArrayLike | |
| volume | ArrayLike | |
| time_open | ArrayLike | |
| anchor | str | 'session' |
| anchor_time | str | '' |
| band_mult | float | 1.0 |
| day_boundary | str | '17:00 America/New_York' |
Indicator: Volume-weighted average price
anchor starts the sums again at each trading day (session, from day_boundary), week
or month, or once at anchor_time (time, written 2024-03-01 13:00 in UTC), with no value
before it. A missing bar starts the sums again. The bands are band_mult times the
volume-weighted standard deviation. No value while the volume so far is 0.
forge.ta.VWAP(**inputs: Any) -> NoneThe average price weighted by volume since the session, week, month or a chosen time.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| source | source | hlc3 | |
| volume | volume | tick | |
| anchor | choice | session | |
| anchor_time | text | ||
| band_mult | float | 1 | 0 to 10 |
| day_boundary | text | 17:00 America/New_York |
VWAP = the running sum of volume * source over the running sum of volume, from each anchor
upper and lower = VWAP plus and minus band_mult * the volume-weighted standard deviation
A session starts at the day boundary. On forex the volume is tick volume. To anchor at a bar found in code, call it on the data from that bar.