donchian
Calculate the Donchian Channels.
Three lines generated by moving average calculations that comprise an indicator formed by upper and lower bands around a midrange or median band. The upper band marks the highest price of a security over N periods while the lower band marks the lowest price of a security over N periods. The area between the upper and lower bands represents the Donchian Channel.
obb.technical.donchian(data: Union[list, dict, pd.DataFrame, List[pd.DataFrame], pd.Series, List[pd.Series], numpy.ndarray, Data, List[Data]], index: str = date, lower_length: int = 20, upper_length: int = 20, offset: int = 0)
Parameters
- Standard
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| data | List[Data] | List of data to be used for the calculation. | None | False |
| index | str | Index column name to use with data, by default "date". | date | True |
| lower_length | PositiveInt | Number of periods for the lower band, by default 20. | 20 | True |
| upper_length | PositiveInt | Number of periods for the upper band, by default 20. | 20 | True |
| offset | int | Offset of the Donchian Channel, by default 0. | 0 | True |
Returns
The calculated data.