Linear Weighted Moving Average (LWMA)

From FxCodeBaseWiki
Jump to: navigation, search

Formula

The Linear Weighted Moving Average formula is:

<math>\operatorname{LWMA}(price, N)_i = \dfrac {{\sum_{j=1}^N} {price_{i - N + j} \times (i - N + j)}} {{\sum_{j=1}^N} {j}}</math>

Unlike Simple Moving Average , where the weight of all previous bars is equal, the Linear Weighted Moving Average makes the most recent bar more important. The weight of each older bar decreases the linearly. Below is a weight chart for N = 10 (1 is the current price, 2 the previous and so on):

Lwma1.PNG

Usage

In Place of Simple Moving Average

The Linear Weighted Moving Average may be used exactly as Exponential Moving Average or Simple Moving Average, especially in the situation when the inertness of Simple Moving Average is cannot be ignored. Just compare LWMA(14), EMA(14) and MVA(14) applied on the same prices:

Lwma2.png

Behavior Comparing SMA and EMA

The Linear Moving Average has less inertness than Simple Moving Average. Comparing Exponential Moving Average, it considers smaller number of bars, and does not depend on the previous value, so, applied on the same prices it will always show the same value, regardless how much data is preloaded. From other side, the linear weight makes the line sharper comparing other moving averages, so at the flat market it produces more "noise".

See Also

Indicators

Simple Moving Average (MVA, SMA), Exponential Moving Average (EMA)

Articles

This Article in Other Languages

Language: English  • español • français • русский • 中文 • 中文(繁體)‎