Skip to content

CoppockCurve #

CoppockCurve #

CoppockCurve(
    fast_roc_period: int,
    slow_roc_period: int,
    wma_period: int,
    input_values: List[float] = None,
    input_indicator: Indicator = None,
    input_modifier: InputModifierType = None,
    input_sampling: SamplingPeriodType = None,
)

Bases: Indicator

CoppockCurve.

Input type: float

Output type: float

Parameters:

Name Type Description Default
fast_roc_period int

Fast ROC period.

required
slow_roc_period int

Slow ROC period.

required
wma_period int

WMA period.

required
input_values List[float]

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/CoppockCurve.py
def __init__(self, fast_roc_period: int,
             slow_roc_period: int,
             wma_period: int,
             input_values: List[float] = None,
             input_indicator: Indicator = None,
             input_modifier: InputModifierType = None,
             input_sampling: SamplingPeriodType = None):
    super().__init__(input_modifier=input_modifier,
                     input_sampling=input_sampling)

    self.fast_roc = ROC(fast_roc_period)
    self.add_sub_indicator(self.fast_roc)

    self.slow_roc = ROC(slow_roc_period)
    self.add_sub_indicator(self.slow_roc)

    self.wma = WMA(wma_period)
    self.add_managed_sequence(self.wma)

    self.initialize(input_values, input_indicator)