Linearly Weighted Moving Average LWMA Formula Examples
1713 reads · Last updated: March 20, 2026
A linearly weighted moving average (LWMA) is a moving average calculation that more heavily weights recent price data. The most recent price has the highest weighting, and each prior price has progressively less weight. The weights drop in a linear fashion. LWMAs are quicker to react to price changes than simple moving averages (SMA) and exponential moving averages (EMA).
Core Description
- A Linearly Weighted Moving Average (LWMA) is a moving average that weights recent prices more than older ones, so it reacts faster to new price changes.
- The LWMA calculation is transparent: prices are multiplied by linear weights and divided by the total of those weights.
- Used well, a Linearly Weighted Moving Average can clarify short-term trend direction, but its speed can also create whipsaws in range-bound markets.
Definition and Background
A Linearly Weighted Moving Average (LWMA) is a type of moving average designed to smooth price data while emphasizing what happened most recently. Unlike a Simple Moving Average (SMA), which treats every observation equally, the Linearly Weighted Moving Average assigns larger weights to newer prices and smaller weights to older prices using a straight-line sequence.
Why “linear weighting” matters
The main idea is straightforward: if you believe the latest prices carry more up-to-date information (earnings reactions, macro headlines, shifts in sentiment), then a Linearly Weighted Moving Average should pay more attention to those prices. That makes LWMA more responsive than SMA, and it is often comparably fast (and sometimes appears faster) than an Exponential Moving Average (EMA) for the same lookback length.
Where LWMA fits among moving averages
Moving averages involve trade-offs, including reducing noise versus staying close to price. The Linearly Weighted Moving Average sits on the more responsive end of the spectrum, which can be helpful when the market is trending, but can be costly when the market is choppy.
Calculation Methods and Applications
The LWMA is built from two ingredients: a lookback period and a linear weighting rule. Most platforms label it as LWMA or WMA (weighted moving average). In many charting contexts, “WMA” refers specifically to the Linearly Weighted Moving Average.
LWMA formula (core version)
For an \(n\)-period Linearly Weighted Moving Average, the newest price gets weight \(n\), and the oldest price gets weight \(1\).
\[\text{LWMA}=\frac{\sum_{i=1}^{n}\left(\text{Price}_i\times i\right)}{\sum_{i=1}^{n} i}\]
The denominator is the sum of the first \(n\) integers:
\[\sum_{i=1}^{n} i=\frac{n(n+1)}{2}\]
Step-by-step numeric example (simple and checkable)
Assume a 5-period window of closing prices from oldest to newest: 10, 11, 12, 13, 14.
Weights from oldest to newest: 1, 2, 3, 4, 5.
- Weighted sum = 10×1 + 11×2 + 12×3 + 13×4 + 14×5 = 190
- Sum of weights = 1 + 2 + 3 + 4 + 5 = 15
- LWMA = 190 / 15 = 12.67
This illustrates why the Linearly Weighted Moving Average tracks recent price more closely than an SMA: the latest value (14) has the largest influence.
Common applications in market analysis (non-operational)
A Linearly Weighted Moving Average is typically used for:
- Trend direction: a rising LWMA may indicate improving momentum, while a falling LWMA may indicate weakening momentum.
- Price context: price above the LWMA often indicates stronger short-term bias than price below it (this is context, not a prediction).
- Crossovers: comparing a short Linearly Weighted Moving Average to a longer one can highlight shifts in short-term momentum versus the broader trend.
- Dynamic reference line: in trending phases, LWMA may act as a visual “pullback reference,” although it can fail during gaps or sharp reversals.
Comparison, Advantages, and Common Misconceptions
The Linearly Weighted Moving Average is often discussed alongside SMA and EMA. They all smooth price data, but they differ in how they treat older observations.
LWMA vs. SMA vs. EMA (quick comparison)
| Indicator | How it weights prices | Typical feel | Main trade-off |
|---|---|---|---|
| SMA | Equal weights | Smoothest, slowest | More lag |
| EMA | Exponential weighting | Fast but smoothed | Can still whipsaw |
| Linearly Weighted Moving Average (LWMA) | Linear weighting | Very responsive | More noise sensitivity |
Advantages of the Linearly Weighted Moving Average
- Faster response to new prices: because the newest data has the highest weight, LWMA can reflect turning points sooner than SMA.
- Transparent and easy to audit: the weighting structure is explicit (1 to \(n\)). If you change the lookback, you can see how sensitivity changes.
- Useful for short-horizon monitoring: when the goal is to understand what the market has been doing recently, a Linearly Weighted Moving Average can provide a clear recent-weighted view.
Limitations and risks to interpret correctly
- Whipsaws in ranges: in sideways markets, the LWMA may flip slope and generate frequent crossings that appear meaningful but are often noise.
- Parameter dependency: a 10-period Linearly Weighted Moving Average behaves very differently from a 50-period LWMA, and small changes can materially alter what you see.
- Lag still exists: LWMA is built from past prices. It can react more quickly, but it does not forecast.
Common misconceptions to avoid
- “LWMA predicts reversals.” It does not. A Linearly Weighted Moving Average re-weights historical prices and can only reflect momentum changes after price has moved.
- “Faster is always better.” Faster indicators may reduce lag in trends, but they can also increase false positives when volatility is high and direction is unclear.
- “One setting works everywhere.” The same LWMA period can behave differently across instruments due to volatility, liquidity, and gap risk.
Practical Guide
This section explains how investors commonly work with a Linearly Weighted Moving Average on charts and in routine review, without turning it into a one-indicator decision rule. Technical indicators are not guarantees, and using them does not remove the risk of loss.
Step 1: Choose a lookback that matches your review rhythm
A practical starting point is to align the Linearly Weighted Moving Average period with how often you review positions:
- Shorter periods react quickly but can be jumpy.
- Longer periods are calmer but may respond later.
Instead of searching for a “perfect” number, aim for a period that produces a readable slope and does not flip direction constantly in typical conditions for that instrument.
Step 2: Use LWMA as context, not a standalone trigger
Common interpretations that remain conditional include:
- Slope check: is the Linearly Weighted Moving Average rising, flat, or falling?
- Distance check: how far is price from the LWMA? Larger gaps may imply elevated short-term volatility.
- Agreement check: does LWMA align with a slower baseline (such as a longer moving average) to reduce overreaction?
Step 3: Add a simple noise filter (conceptual)
Because LWMA is sensitive, analysts often pair it with a volatility or volume lens. The goal is to reduce the chance of overreading small changes in the Linearly Weighted Moving Average during low-quality price action (thin trading, headline-driven swings, or mean-reverting ranges).
Step 4: Platform workflow example (tooling)
In Longbridge ( 长桥证券 ), investors commonly add a Linearly Weighted Moving Average to a standard price chart, then compare it with another moving average type (such as SMA or EMA) to visually understand the lag-versus-noise trade-off. Alerts can be set around the LWMA level or around crossings, but the interpretation should remain conditional rather than predictive.
Case Study (hypothetical scenario, not investment advice)
Assume a hypothetical U.S.-listed company, “ABC,” releases earnings after the close. The next day, ABC opens higher, trades with large intraday swings, and closes above the prior range.
- A 10-period Linearly Weighted Moving Average turns upward quickly because the newest closes receive the heaviest weights.
- A 10-period SMA rises more slowly because it spreads influence evenly across the window.
- If the post-earnings move partially retraces over the next few sessions, the LWMA may flatten or turn down sooner than the SMA.
This illustrates that the Linearly Weighted Moving Average can surface short-term momentum shifts earlier, but it may also reverse direction more quickly when volatility is elevated, which may increase false signals.
Resources for Learning and Improvement
Core definitions and terminology
- Investopedia entries on Linearly Weighted Moving Average, moving averages, trend analysis, lag, and whipsaw can help standardize vocabulary before comparing indicators.
Technical analysis foundations (books)
- John J. Murphy’s Technical Analysis of the Financial Markets and Martin Pring’s works provide structured explanations of smoothing, trend confirmation, and why faster signals can fail in ranges.
Platform specifications and documentation
- Check charting documentation to confirm whether the platform labels it LWMA or WMA, the exact weight assignment, and how initial data points are handled. Small implementation differences can change what you see.
Research mindset (robustness over cleverness)
- Look for studies and practitioner notes that test moving-average rules under transaction costs, slippage, and changing volatility regimes. The key learning is usually about robustness and parameter sensitivity, not “winning settings.”
FAQs
What is a Linearly Weighted Moving Average (LWMA) in plain English?
A Linearly Weighted Moving Average is an average of recent prices that gives the newest prices more influence than older ones. It smooths the chart, but it reacts faster than an SMA because the weighting emphasizes the latest data.
How is LWMA different from an EMA?
Both emphasize recent prices, but the pattern differs: EMA uses exponential decay, while a Linearly Weighted Moving Average uses linear weights (1 to \(n\)). LWMA’s weighting rule is explicit, while EMA’s decay is determined by its smoothing factor.
Is LWMA better than SMA?
Not universally. A Linearly Weighted Moving Average can reduce lag in trending conditions, but it can create more whipsaws in sideways markets. Suitability depends on volatility, market regime, and how the indicator is used.
What does it mean when price is above the LWMA?
It commonly indicates that recent prices are stronger relative to the recent-weighted average. This is context, not a guarantee. In volatile markets, price can cross above and below a Linearly Weighted Moving Average frequently.
What LWMA period should I start with?
There is no single best period. Many investors start with a commonly used short-to-medium lookback (for example, around 10 to 20 for short-term monitoring, or 50 to 200 for broader trend context), then adjust based on how noisy the Linearly Weighted Moving Average appears for that instrument.
Why does LWMA whipsaw more than other averages?
Because a Linearly Weighted Moving Average concentrates weight on the newest observations. When price oscillates in a range, the newest data points change direction often, and LWMA tends to reflect those changes more aggressively.
Can LWMA be used across different assets and timeframes?
Yes, but interpretation should adapt. The same Linearly Weighted Moving Average setting can behave differently on a high-volatility growth stock versus a lower-volatility index, or on intraday charts versus weekly charts.
Conclusion
A Linearly Weighted Moving Average (LWMA) is a transparent moving average that prioritizes recent prices through linear weights. Its main benefit is responsiveness, which can help clarify short-term momentum changes sooner than an SMA and can be comparable in speed to an EMA for the same lookback length. Its main drawback is higher sensitivity to noise, which can lead to whipsaws in range-bound or headline-driven conditions. When treated as a context tool, and combined with sensible lookback choices and basic confirmation, LWMA can support a more structured reading of recent market behavior without implying forecasts or guaranteed outcomes.
