Linearly Weighted Moving Average (LWMA)

What is LWMA?

A Linearly Weighted Moving Average (LWMA) is a moving average that assigns greater weight to recent data points and progressively less weight to older ones in a linear fashion. Compared with a Simple Moving Average (SMA), LWMA reacts faster to recent price changes and reduces—but does not eliminate—lag.

Formula

LWMA = (Pn W1 + Pn-1 W2 + … + P1*Wn) / (W1 + W2 + … + Wn)

Typically weights are linear integers 1, 2, …, n (highest weight to the most recent period). In that common case:
LWMA = (Σ(i * P(i))) / (Σ i) for i = 1..n, where P(i) is price i periods ago (i = n is most recent).

How to calculate LWMA (step-by-step)

  1. Choose a lookback period n (e.g., 5, 20, 50).
  2. Assign linear weights (most common: 1 to n, with n for the most recent).
  3. Multiply each period’s price by its weight and sum the results.
  4. Divide that sum by the total of the weights (Σ 1..n = n(n+1)/2 for standard linear weights).

Example (5-period LWMA)

Prices for days 1–5 (day 5 is most recent):
- Day 5: 90.90
- Day 4: 90.36
- Day 3: 90.28
- Day 2: 90.83
- Day 1: 90.91

Calculation:
LWMA = ((90.90 5) + (90.36 4) + (90.28 3) + (90.83 2) + (90.91*1)) / (5+4+3+2+1)
LWMA ≈ 90.62

What LWMA tells you

  • Trend direction: Price above a rising LWMA suggests an uptrend; below a falling LWMA suggests a downtrend.
  • Trend changes: Price crossing the LWMA can indicate a potential reversal or shift in momentum.
  • Dynamic support/resistance: The LWMA often acts as a dynamic support in uptrends and resistance in downtrends.
  • Volatility gauge: The distance between price and LWMA can help indicate market volatility (wider gap = higher volatility).

Advantages

  • More responsive to recent price action than an SMA.
  • Retains some smoothing (less noisy than raw price) while reducing lag.
  • Customizable weighting allows tuning to trader preferences.
  • Applicable to price, volume, and other market metrics across asset classes.

Drawbacks

  • More sensitive to outliers and short-term noise than SMA; large recent spikes can skew the average.
  • Slightly more complex to calculate and choose appropriate weights.
  • Still lags during sharp reversals and can generate false signals in choppy markets.
  • Weight selection can introduce subjectivity and risk of overfitting.

Alternatives

  • Simple Moving Average (SMA): Equal weight for all periods—smoother but slower to react.
  • Exponential Moving Average (EMA): Exponentially greater weight to recent data—quick response with less abrupt weighting than LWMA.
  • Smoothed Moving Average (SMMA): More smoothing than EMA, for medium-term trends.
  • Weighted Moving Average (WMA): General weighted scheme; weights need not be linear.
  • Triangular Moving Average (TMA): Symmetrical weighting with emphasis on the middle of the window for extra smoothing.

Common use cases

  • Trend identification using short- vs. long-term LWMA crossovers.
  • Entry/exit signals: bullish crossover (short-term LWMA above long-term LWMA) as buy signal; bearish crossover as sell signal.
  • Identifying dynamic support/resistance levels.
  • Combining with other indicators (volume, oscillators) for signal confirmation.

Timeframes

  • Short-term (e.g., 5–10 periods): very responsive, used for intraday or quick trades.
  • Medium-term (e.g., 20–50 periods): balanced sensitivity for swing trading.
  • Long-term (e.g., 100–200 periods): smoother view for major trends and strategic decisions.

Quick FAQs

  • How does LWMA differ from SMA? LWMA weights recent data more heavily; SMA weights all points equally.
  • What do weights look like? Commonly 1..n with n assigned to the most recent period, but weights can be customized.
  • Will LWMA eliminate lag? No—it reduces lag relative to SMA but still lags price, especially around sharp reversals.

Conclusion

LWMA is a practical technical tool when you want greater responsiveness to recent price action than an SMA provides, while keeping some smoothing. It’s best used alongside other indicators and risk-management practices, and weight/period choices should align with your trading timeframe and tolerance for noise.