pdist#
API documentation for pandas_ta.volatility.pdist Python function.
- pdist(open_, high, low, close, drift=None, offset=None, **kwargs)[source]#
Price Distance (PDIST)
Measures the “distance” covered by price movements.
- Sources:
https://www.prorealcode.com/prorealtime-indicators/pricedistance/
- Calculation:
- Default Inputs:
drift=1
PDIST = 2(high - low) - ABS(close - open) + ABS(open - close[drift])
- Args:
open_ (pd.Series): Series of ‘opens’s high (pd.Series): Series of ‘high’s low (pd.Series): Series of ‘low’s close (pd.Series): Series of ‘close’s 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.