decreasing#
API documentation for pandas_ta.trend.decreasing Python function.
- decreasing(close, length=None, strict=None, asint=None, percent=None, drift=None, offset=None, **kwargs)[source]#
Decreasing
Returns True if the series is decreasing over a period, False otherwise. If the kwarg ‘strict’ is True, it returns True if it is continuously decreasing over the period. When using the kwarg ‘asint’, then it returns 1 for True or 0 for False.
- Calculation:
- if strict:
decreasing = all(i > j for i, j in zip(close[-length:], close[1:]))
- else:
decreasing = close.diff(length) < 0
- if asint:
decreasing = decreasing.astype(int)
- Args:
close (pd.Series): Series of ‘close’s length (int): It’s period. Default: 1 strict (bool): If True, checks if the series is continuously decreasing over the period. Default: False percent (float): Percent as an integer. Default: None asint (bool): Returns as binary. Default: True drift (int): The difference period. Default: 1 offset (int): How many periods to offset the result. Default: 0
- Kwargs:
fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method
- Returns:
pd.Series: New feature generated.