WMA 20 50 Proximity Crossover (Trend)

Anticipates the 20/50 weighted-average crossover: buys when the fast average rises to within 0.5% of the slow one from below, and sells when it falls back to within 0.5% from above.

How It Works

  1. Compute the 20- and 50-bar weighted moving averages and their relative gap, (WMA20 − WMA50) / WMA50.
  2. Buy when the gap, rising from below, comes within 0.5% of zero — the fast average is about to overtake the slow one, so this acts one step before the actual crossover.
  3. Sell when the gap, falling from above, drops back within 0.5% of zero — exiting just before the bearish cross completes.

Worked example. WMA50 is 100 and WMA20 has climbed from 99.2 to 99.6 — the gap improved from −0.8% to −0.4%, inside the 0.5% band — buy ahead of the likely cross. Later, with the gap shrinking from +0.9% to +0.4%, the strategy sells before the cross down completes.

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 Data43/ 100Composite score

Metrics Per Trade

Final Metrics

Scores

Resampled Data49/ 100Composite score

Metrics Per Trade

Final Metrics

Scores