AverageTrueRange
class backtide.indicators.AverageTrueRange(period=14)
Average True Range (ATR).
Measures market volatility by calculating the average of the true range over a period. The true range accounts for gaps between sessions. Useful for position sizing, setting stop-loss levels, and comparing volatility across instruments.
Formula:
\[
\begin{aligned}
TR_t &= \max(H_t - L_t,\; |H_t - C_{t-1}|,\; |L_t - C_{t-1}|) \\\\
ATR_t &= \frac{1}{n} \sum_{i=0}^{n-1} TR_{t-i}
\end{aligned}
\]
Read more on Wikipedia.
| Parameters |
Look-back window length.
|
| Attributes |
Short ticker-style acronym.
name : str
Human-readable indicator name.
|
See Also
Average Directional Index (ADX).
Bollinger Bands (BB).
Simple Moving Average (SMA).
Methods
| compute | Compute the indicator on a dataset. |
| description | Short explanation of what the indicator measures. |
method backtide.indicatorscompute(data)
Compute the indicator on a dataset.
method backtide.indicatorsdescription()
Short explanation of what the indicator measures.
| Returns |
str
The description.
|