Skip to main content

atr

Calculate the Average True Range.

Used to measure volatility, especially volatility caused by gaps or limit moves. The ATR metric helps understand how much the values in your data change on average, giving insights into the stability or unpredictability during a certain period. It's particularly useful for spotting trends of increase or decrease in variations, without getting into technical trading details. The method considers not just the day-to-day changes but also accounts for any sudden jumps or drops, ensuring you get a comprehensive view of movement.

Parameters

data: list[openbb_core.provider.abstract.data.Data]

list of data to apply the indicator to.

Optional: False


index: str

Index column name, by default 'date'

Default: date

Optional: True


length: int

It's period, by default 14

Default: 14

Optional: True


mamode: Literal['rma', 'ema', 'sma', 'wma']

Moving average mode, by default 'rma'

Default: rma

Optional: True


drift: int

The difference period, by default 1

Default: 1

Optional: True


offset: int

How many periods to offset the result, by default 0

Optional: True


Returns

results: list[Data]

Serializable results.


provider: None

Provider name.


warnings: Optional[list[Warning_]]

list of warnings.


chart: Optional[Chart]

Chart object.


extra: dict[str, Any]

Extra info.


On this page