VOOI Academy
  • VOOI Academy: Home
  • Candlestick Analysis
    • Candle Patterns
      • One-Candle Patterns
      • Two-Candle Patterns
      • Three+ Candle Patterns (Part 1)
      • Three+ Candle Patterns (Part 2)
  • 📈 Trading strategies
    • 🛡️ Strategy basics
      • Swing Trading: A Beginner-Friendly Guide
      • Zero-Cost Collar: What It Is and How It Works
      • Calendar Spread: What It Is and How It Works
    • 🧠 Introduction to Trading Psychology and Risk Management
      • Trading Psychology
      • Risk Management
      • Decision-Making Under Uncertainty in Trading
      • Handling Losses & Drawdowns in Trading
      • Developing Discipline & Patience in Trading
    • 📊 Indicators & Tools
      • MA Cross
      • Relative Strength Index (RSI)
      • Accelerator Oscillator (AC)
      • Accumulation/Distribution (A/D) Indicator
      • Accumulative Swing Index (ASI)
      • Advance/Decline Line (A/D Line)
      • Arnaud Legoux Moving Average (ALMA)
      • Aroon Indicator
      • Average Directional Index (ADX)
      • Average Price Indicator
      • Average True Range (ATR)
      • Awesome Oscillator (AO)
      • Balance of Power (BOP)
      • Bollinger Bands
      • Chaikin Money Flow (CMF)
      • Chaikin Oscillator
      • Chaikin Volatility (CV)
      • Chande Kroll Stop
      • Chande Momentum Oscillator (CMO)
      • Chop Zone Indicator
      • Choppiness Index
      • Commodity Channel Index (CCI)
      • Connors RSI: A Powerful Twist on a Classic Indicator
      • Coppock Curve: A Momentum Indicator with Long-Term Vision
      • Correlation – Log: Understanding Market Relationships with Precision
      • Correlation Coefficient Indicator: Understanding Asset Relationships
      • Detrended Price Oscillator (DPO)
      • Directional Movement (DMI)
      • Donchian Channel: Trend Clarity with Simplicity
      • Double Exponential Moving Average (DEMA)
      • Ease Of Movement (EOM)
      • Elder’s Force Index (EFI)
      • Envelopes Indicator
      • Fisher Transform
      • Guppy Multiple Moving Average (GMMA)
      • Historical Volatility (HV)
      • Hull Moving Average (HMA)
      • Ichimoku Cloud
      • Keltner Channels
      • Klinger Oscillator
      • Know Sure Thing (KST)
      • Least Squares Moving Average (LSMA)
      • Linear Regression Curve
      • Linear Regression Slope
      • MA with EMA Cross
      • MACD (Moving Average Convergence Divergence)
      • McGinley Dynamic: A Smarter Moving Average
      • Median Price
      • Momentum Indicator
      • Money Flow Index (MFI)
      • Moving Average (MA)
      • Adaptive Moving Average (AMA)
      • Double Moving Average (DMA)
      • Exponential Moving Average (EMA)
      • Hamming Moving Average (HMA)
      • Moving Average Multiple (MAM)
      • Triple Moving Average (TMA)
      • Weighted Moving Average (WMA)
      • Net Volume
      • On Balance Volume (OBV)
  • Automated Trading
    • Automated Trading vs. Manual Trading
    • Choosing the Right Strategy for Automated Trading
    • Alerts and their importance in automated trading
    • Connecting alerts using API keys
    • Setting up a trading bot for VOOI
  • VOOI
Powered by GitBook
On this page
  • 🔍 What is it?
  • ⚙️ How It Works
  • 📖 How to Read It
  • ⚙️ Best Settings
  • 🧠 How to Use It in a Strategy
  • ⚠️ Common Mistakes
  • 🧠 Final Thoughts
  1. 📈 Trading strategies
  2. 📊 Indicators & Tools

Hamming Moving Average (HMA)

PreviousExponential Moving Average (EMA)NextMoving Average Multiple (MAM)

Last updated 7 days ago

🔍 What is it?

The Hamming Moving Average (HMA) is a type of weighted moving average that applies a Hamming window function to smooth out price data. Originating from signal processing, this method is designed to minimize distortion and noise, offering a clearer view of the underlying price trend while reacting moderately to price changes.

Unlike a simple or exponential moving average, the HMA is tailored to reduce the side effects of abrupt price fluctuations, giving traders a more reliable depiction of the market’s direction.

⚙️ How It Works

The Hamming Moving Average is calculated using a convolution of price data with a Hamming window — a mathematical function that applies varying weights to each data point, with heavier emphasis on central values and less on edges.

The Hamming window formula is:

w(n) = 0.54 - 0.46 * cos(2πn / (N - 1))

Where:

  • n is the data point index

  • N is the total number of periods in the window

These weights are then applied to the corresponding price values to compute the weighted average. The result is a smoother curve with minimal lag and less distortion compared to traditional moving averages.

📖 How to Read It

Reading the Hamming MA is very similar to other moving averages, with a key difference in how smooth the line appears:

  • When price is above the HMA, it indicates a bullish trend.

  • When price is below, it suggests bearish conditions.

  • The steepness of the curve represents trend strength.

  • Flattening of the line may suggest consolidation or a trend reversal.

⚙️ Best Settings

The ideal settings depend on your trading style:

  • Short-term (5–15 periods): Good for scalping or short trades.

  • Medium-term (20–50 periods): Suitable for swing trading.

  • Long-term (100+ periods): Helps with macro trend analysis.

Since HMA uses a weighted approach, even shorter periods can offer smoother results than a regular SMA of the same length.

🧠 How to Use It in a Strategy

Here are several effective strategies using the Hamming Moving Average:

1. Trend-Following

Use HMA as a baseline. When price consistently stays above the HMA, remain long; if price stays below, consider short positions.

2. Crossover Strategy

Use two Hamming MAs:

  • A short-period HMA (e.g., 20)

  • A longer-period HMA (e.g., 50)

When the shorter HMA crosses above the longer one, it generates a bullish signal. When it crosses below, it’s a bearish signal.

3. Support and Resistance

The HMA can act as a dynamic support or resistance line. In uptrends, price may bounce off the HMA as support. In downtrends, it may reject from it as resistance.

4. Filtering Noise

Pair the Hamming MA with a momentum oscillator like RSI or MACD to filter false breakouts and confirm signals.

⚠️ Common Mistakes

  • Using only one indicator: HMA is powerful but should not be used alone. Always confirm signals with other tools.

  • Over-optimizing period settings: Trying to make the HMA perfectly match past price action can result in curve-fitting.

  • Ignoring price structure: Even with a smoothed indicator, price action remains key to context.

  • Forcing trades in ranging markets: Like most trend indicators, HMA performs best during trending conditions.

🧠 Final Thoughts

The Hamming Moving Average may not be as widely used as SMA or EMA, but it offers a unique advantage—smooth trend lines with reduced lag and less noise. It’s especially helpful in strategies that require clean signals or when trading in volatile markets where fake-outs are common.

Use the Hamming MA when you want to:

  • Spot cleaner trend direction

  • Reduce noise in volatile markets

  • Gain smoother insight into momentum shifts

It’s a valuable addition to any trader’s toolbox, particularly when paired with price action and other supporting indicators.