Skip to content

VWAP #

VWAP #

VWAP(
    input_values: List[OHLCV] = None,
    input_indicator: Indicator = None,
    input_modifier: InputModifierType = None,
    input_sampling: SamplingPeriodType = None,
)

Bases: Indicator

Volume Weighted Average Price.

Input type: OHLCV

Output type: float

Parameters:

Name Type Description Default
input_values List[OHLCV]

List of input values.

None
input_indicator Indicator

Input indicator.

None
input_modifier InputModifierType

Input modifier.

None
input_sampling SamplingPeriodType

Input sampling type.

None
Source code in talipp/indicators/VWAP.py
def __init__(self, input_values: List[OHLCV] = None,
             input_indicator: Indicator = None,
             input_modifier: InputModifierType = None,
             input_sampling: SamplingPeriodType = None):
    super().__init__(input_modifier=input_modifier,
                     input_sampling=input_sampling)

    self.sum_price_vol = []
    self.sum_vol = []

    self.add_managed_sequence(self.sum_price_vol)
    self.add_managed_sequence(self.sum_vol)

    self.initialize(input_values, input_indicator)