Overlap studies
Weighted Moving Average
Linearly weighted moving average that emphasizes recent closing prices.
- Engine
- TA-Lib
- Function
WMA- Input series
- close
- Outputs
- 1
How it works
WMA applies weights from 1 through the configured period, giving the newest close the largest weight, and divides the weighted sum by the sum of those weights.
Use case
Use WMA as a responsive smoothed price feature for trend direction, crossovers, and support or resistance context.
Parameters
| Parameter | Type | Default | Bounds or options | Description |
|---|---|---|---|---|
| Time Period | integer | 30 | 1…100000 | Number of closing-price bars included in the weighted window. |
Outputs
| Output | Type | Description |
|---|---|---|
| WMA | number | Weighted moving average value for the bar. |
Reading the result
WMA assigns progressively greater influence to more recent observations inside a fixed rolling window. It usually reacts faster than a simple average of the same length while remaining a finite-window calculation.
This weighting can be useful when recency should matter linearly, but it can also amplify short-lived changes near the end of the window.
Common mistakes
- Assuming every product called WMA uses the same weighting convention.
- Treating faster response as evidence of better forecasting.
- Comparing it directly with recursive averages without considering initialization differences.
- Adding WMA, SMA, and EMA variants without measuring feature correlation.
DataCat workflow notes
Use several moving-average families only when their weighting differences support a defined experiment. For a compact set, choose the smoothing behavior that matches the intended horizon and sensitivity.