Momentum WMA Crossover (Momentum)

Trades momentum acceleration: buys when the 90-bar trailing return crosses above its own 20-bar weighted average — the uptrend is strengthening — and sells when it crosses back below.

How It Works

  1. Measure the 90-bar trailing return each bar, then smooth that momentum series itself with a 20-bar weighted moving average — momentum's own recent norm.
  2. Buy when momentum crosses above its average: the trend is not just up, it is strengthening — accelerating past its own recent pace.
  3. Sell when momentum crosses back below its average — the trend is decelerating. This fires before momentum ever turns negative, so exits come earlier than in the other momentum strategies, at the cost of more frequent trades.

Worked example. The 90-bar return has been hovering around +8% (its 20-bar average). A strong week lifts it from +7.5% to +10.2%, crossing above the average — buy, the uptrend is accelerating. Later, momentum still reads +6% but slips under its now-higher average — the rally is losing pace, so the position closes while the trend is still technically up.

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.

Trailing Return (Momentum)
The percentage change of price versus N bars ago — the simplest possible measure of trend. Positive means price is higher than it was back then, negative means lower.
2026-07-17T19:28:13.939341 image/svg+xml Matplotlib v3.11.0, https://matplotlib.org/
Example: If price is 120 today and was 100 ninety bars ago, momentum is (120 / 100 − 1) × 100 = +20% — the market has trended up over the window.
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.
2026-07-17T19:28:20.193497 image/svg+xml Matplotlib v3.11.0, https://matplotlib.org/
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 Data — Score 27 / 100

Metrics Per Trade

Final Metrics

Scores

Resampled Data — Score 36 / 100

Metrics Per Trade

Final Metrics

Scores