AverageDirectionalIndex
class backtide.indicators.AverageDirectionalIndex(period=14)
Average Directional Index (ADX).
Quantifies trend strength on a scale of 0 to 100, regardless of direction. Values above 25 generally indicate a strong trend; below 20, a weak or ranging market. Useful for determining whether a market is trending or ranging before applying trend-following or mean-reversion strategies.
Formula:
\[
\begin{aligned}
+DI_t &= 100 \cdot \frac{Smoothed(+DM_t)}{ATR_t} \\\\
-DI_t &= 100 \cdot \frac{Smoothed(-DM_t)}{ATR_t} \\\\
DX_t &= 100 \cdot \frac{|+DI_t - (-DI_t)|}{+DI_t + (-DI_t)} \\\\
ADX_t &= EMA_n(DX_t)
\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 True Range (ATR).
MovingAverageConvergenceDivergence
Moving Average Convergence Divergence (MACD).
Relative Strength Index (RSI).
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.
|