Ta4j Wiki

Documentation, examples and further information of the ta4j project

View the Wiki On GitHub

This project is maintained by ta4j Organization

Summary of Moving Averages

History of Moving Averages

Moving averages have been a cornerstone of technical analysis for decades. They were first developed in the early 20th century to help traders and analysts smooth out price data and identify trends in financial markets. Among the earliest applications was the Simple Moving Average (SMA), which gained popularity due to its simplicity. Over time, more sophisticated moving averages, such as the Exponential Moving Average (EMA), were introduced to address the lag associated with the SMA. Notable contributions include the work of J. Welles Wilder, who developed the Wilder’s Moving Average in his 1978 book, New Concepts in Technical Trading Systems. The development of modern computational tools has further enabled innovations like the Zero Lag EMA (ZLEMA) and Displaced Moving Average (DMA).


What Moving Averages Can Tell Us

Moving averages provide insight into market trends and price behavior by smoothing out short-term fluctuations in price data. Key takeaways include:


How Moving Averages Are Used

Moving averages are versatile tools used in a variety of ways:

  1. Identifying Trends:
    • Traders use moving averages to determine whether the market is trending upwards, downwards, or sideways.
  2. Crossover Strategies:
    • Common strategies involve using two moving averages of different lengths. For example:
      • A Golden Cross occurs when a short-term moving average (e.g., 50-day) crosses above a long-term moving average (e.g., 200-day), signaling a potential uptrend.
      • A Death Cross occurs when a short-term moving average crosses below a long-term moving average, signaling a potential downtrend.
  3. Support and Resistance:
    • Moving averages are often used as dynamic support/resistance levels in price charts, providing entry or exit points.
  4. Volatility Reduction:
    • By smoothing out noise in price data, moving averages help traders focus on the overall trend rather than short-term fluctuations.
  5. Baseline for Indicators:
    • Many technical indicators, such as Bollinger Bands, MACD, and RSI, are built using moving averages as a foundation.

Moving Averages in TA4J

Abbreviation Full Name Indicator Name Moving Average Type
ATMA Asymmetric Triangular Moving Average ATMAIndicator Specialized Moving Average
DEMA Double Exponential Moving Average DoubleEMAIndicator Exponential Moving Average
DMA Displaced Moving Average DMAIndicator Specialized Moving Average
EDMA Exponential Displaced Moving Average EDMAIndicator Exponential Moving Average
EMA Exponential Moving Average EMAIndicator Exponential Moving Average
HMA Hull Moving Average HMAIndicator Specialized Moving Average
JMA Jurik Moving Average JMAIndicator Specialized Moving Average
KAMA Kaufman Adaptive Moving Average KAMAIndicator Adaptive Moving Average
KiJunV2 Kihon Moving Average KiJunV2Indicator Specialized Moving Average
LSMA Least Squares Moving Average LSMAIndicator Polynomial-Based Moving Average
LWMA Linear Weighted Moving Average LWMAIndicator Weighted Moving Average
McGinley McGinleys Moving Average McGinleyMAIndicator Adaptive Moving Average
MMA Modified Moving Average MMAIndicator Exponential Moving Average
SMA Simple Moving Average SMAIndicator Simple Moving Average
SGMA Savitzky-Golay Moving Average SGMAIndicator Polynomial-Based Moving Average
SMMA Smoothed Moving Average SMMAIndicator Smoothed Moving Average
TEMA Triple Exponential Moving Average TripleEMAIndicator Exponential Moving Average
TMA Triangular Moving Average TMAIndicator Simple Moving Average
VIDYA Chandes Variable Index Dynamic Moving Average VIDYAIndicator Adaptive Moving Average
VMA Variable Moving Average   Adaptive Moving Average
VWMA Volume Weighted Moving Average   Weighted Moving Average
WilderMA Wilders Moving Average WildersMAIndicator Smoothed Moving Average
WMA Weighted Moving Average WMAIndicator Weighted Moving Average
ZLEMA Zero Lag Exponential Moving Average ZLEMAIndicator Exponential Moving Average

Classification of Moving Averages

1. Simple Moving Averages


2. Weighted Moving Averages


3. Exponential Moving Averages


4. Adaptive Moving Averages


5. Smoothed Moving Averages


6. Polynomial-Based Moving Averages


7. Specialized Moving Averages


Conclusion

Moving averages remain essential in modern technical analysis due to their simplicity, flexibility, and effectiveness in revealing market trends and dynamics.