MovingAverageConvergenceDivergence
class backtide.indicators.MovingAverageConvergenceDivergence(fast_period=12, slow_period=26, signal_period=9)
Moving Average Convergence Divergence (MACD).
A trend-following momentum indicator that shows the relationship between two EMAs. The MACD line is the difference between a fast and slow EMA; the signal line is an EMA of the MACD line itself. Useful for trend direction and momentum, signal line crossovers for entry/exit timing, and histogram divergence analysis.
Formula:
\[
\begin{aligned}
MACD_t &= EMA_{fast}(C_t) - EMA_{slow}(C_t) \\\\
Signal_t &= EMA_{signal}(MACD_t)
\end{aligned}
\]
Read more on Wikipedia.
See Also
Average Directional Index (ADX).
Exponential Moving Average (EMA).
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.
|