WMA 20 50 200 Stack (Trend)

Buys when the 20/50/200 weighted moving averages stack bullishly — fast above mid above slow — and sells when the fast average drops back below the mid.

How It Works

  1. Compute three weighted moving averages over 20, 50 and 200 bars.
  2. Buy when they stack bullishly — fast above mid above slow. With a 200-bar anchor this is the slowest confirmation of the three stack strategies: fewer signals, but only in established trends.
  3. Sell when the fast average drops back below the mid.

Worked example. WMA20 = 105 crosses above WMA50 = 104.2 while both already sit above WMA200 = 98 — the stack aligns, so buy. When WMA20 later dips back under WMA50, the position closes.

The Math Behind The Indicators

Everything runs on closing prices of the traded timeframe: P is a close, Pt today's close, and N counts bars — one bar is one candle of that timeframe, so 20 bars on a 1h chart is 20 hours.

Weighted Moving Average (WMA)
A moving average where newer prices count more: the latest close gets weight N, the one before N − 1, down to weight 1 for the oldest. That makes it react to a turn in price sooner than a plain average.
\[\mathrm{WMA}_N = \dfrac{N \cdot P_t + (N-1) \cdot P_{t-1} + \cdots + 1 \cdot P_{t-N+1}}{N + (N-1) + \cdots + 1}\]
Example: With N = 3 and closes 100, 102, 104 (oldest to newest): (1·100 + 2·102 + 3·104) / (1 + 2 + 3) = 616 / 6 ≈ 102.67 — pulled closer to the latest price than the plain average of 102.

Example Chart

Real Data59/ 100Composite score

Metrics Per Trade

Final Metrics

Scores

Resampled Data68/ 100Composite score

Metrics Per Trade

Final Metrics

Scores