WMA: Weighted Moving Average
Weighted Moving Average
close > @WMA(close, 50) Key Takeaways
- Smooths daily price fluctuations to isolate underlying trend direction.
- Serves as dynamic support, resistance, and systematic trailing stop levels.
- Longer lookbacks (50, 200) minimize execution churn and false crossovers.
What It Means in Simple Terms
Weighted Moving Average is a trend filter that averages past prices over time to smooth away daily market noise. Think of it like stepping back from a pixelated photograph: zooming in reveals jagged dots (daily price noise), but stepping back reveals the clear underlying image (the trend).
How It Helps You as an Investor
It keeps you on the right side of the market. Trading in the direction of the WMA prevents you from fighting powerful institutional trends, helping you ride winners longer and cut losers early.
Visual Node Rule Syntax & How to Plug in Values
close > @WMA(close, 50) Parameter Tuning & Market Calibration
The key setting is the lookback window $n$. A 20-period lookback tracks short-term momentum; a 50-period lookback tracks intermediate swing health; and a 200-period lookback tracks long-term structural bull/bear regimes. Short lookbacks react quickly but produce more whipsaws; long lookbacks are highly reliable but carry more lag.
Input Fields & Parameters
| Field / Parameter | Type | Default | Role & Description |
|---|---|---|---|
close | field | Required | Historical input price or volume series from market feed. |
timeperiod | int | 30 | Lookback period or tuning parameter for market calibration. |
Mathematical Formulation
The mathematical definition of WMA (Weighted Moving Average) as evaluated within the Saral Engine execution pipeline:
Variable & Parameter Definitions
Calculates Weighted Moving Average across the selected price series over lookback window $n$.
Systematic Strategy Applications
close > @WMA(close, 200) Mandate that long positions are entered only when price trades above the 200-period WMA.
Common Questions & Practical Considerations
Why does WMA lag behind rapid price reversals?
All moving averages look backwards at historical data. When a sharp reversal occurs, it takes several bars for recent prices to shift the moving average.
How do I prevent whipsaws using WMA?
Avoid taking crossover signals during flat, sideways markets. Adding an ADX filter (`ADX > 25`) or requiring a confirmed multi-day close above the average eliminates most false breakouts.