Skip to content

Indicator Formula

Technical Details — Linear Moving Average (LMA)

Section titled “Technical Details — Linear Moving Average (LMA)”

The Linear Moving Average (LMA), also known as Weighted Moving Average (WMA), applies linearly increasing weights to prices. The most recent bar gets weight n, the previous gets n-1, and so on. This produces a more responsive average than SMA but with a different character than EMA.


Mathematical Derivation

Purpose: Apply linearly increasing weights to each bar.

$$WeightedSum = \sum_{i=0}^{n-1} (n - i) \times Close[t-i]$$

Where:

  • $$n$$ = Period
  • Weight for most recent bar = n, oldest bar = 1

What This Measures: Linearly weighted sum of prices


Purpose: Normalize by the sum of all weights.

$$LMA[t] = \frac{WeightedSum}{\sum_{i=1}^{n} i} = \frac{WeightedSum}{n(n+1)/2}$$

What This Measures: Linearly weighted average price



Compact Formula Summary

$$LMA[t] = \frac{\sum_{i=0}^{n-1} (n-i) \times Close[t-i]}{n(n+1)/2}$$

Default Parameter: Period (n) = 14


Complete Calculation Example

With Period = 3 and closes [44, 45, 46] (oldest to newest): $$LMA = \frac{1×44 + 2×45 + 3×46}{1+2+3} = \frac{44+90+138}{6} = \frac{272}{6} = 45.33$$

SMA would give 45.00 — LMA is closer to the newest price.


Key Takeaways from the Example
  1. Linear Weighting: Clear, intuitive weight distribution — recent bars always have more influence
  2. Middle Ground: More responsive than SMA, less exponential than EMA
  3. No Memory Beyond Window: Like SMA, only considers the last n bars — no infinite memory
  4. Drop-Off Effect: When a heavily weighted recent bar drops off the window, LMA can shift noticeably