atr
Average True Range.
Used to measure volatility, especially volatility caused by gaps or limit moves.
Example:
from openbb import obb
stock_data = obb.equity.price.historical(symbol="TSLA", start_date="2023-01-01", provider="fmp")
atr_data = obb.technical.atr(data=stock_data.results)
Parameters
- Standard
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| data | List[Data] | List of data to apply the indicator to. | None | False |
| index | str | Index column name, by default "date" | date | True |
| length | PositiveInt | It's period, by default 14 | 14 | True |
| mamode | Literal["rma", "ema", "sma", "wma"] | Moving average mode, by default "rma" | rma | True |
| drift | NonNegativeInt | The difference period, by default 1 | 1 | True |
| offset | int | How many periods to offset the result, by default 0 | 0 | True |
Returns
List of data with the indicator applied.