RSI WMA Crossover (Trend)
Buys when the 20-bar RSI crosses above its own 20-bar weighted moving average and sells when it crosses back below.
How It Works
- Compute the 20-bar RSI, then smooth the RSI itself with a 20-bar weighted moving average.
- Buy when the RSI crosses above its own average — momentum is improving faster than its recent norm.
- Sell when the RSI crosses back below its average.
Worked example. The 20-bar RSI has averaged 48 lately (its WMA). Yesterday the RSI read 47; today it jumps to 52, crossing above its own average — buy. When the RSI later sinks back below its smoothed line, the trade 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.
- Relative Strength Index (RSI)
- A 0–100 gauge of how one-sided recent moves have been. It compares G, the average size of up-moves, to L, the average size of down-moves, over the last N bars (using Wilder's smoothed averages): near 100 almost every recent bar went up, near 0 almost every bar went down, 50 is balanced.
- Example: If over the last 14 bars up-moves averaged 2.0 and down-moves averaged 1.0, then G/L = 2 and RSI = 100 − 100 / 3 ≈ 67. Readings below 30 are called oversold, above 70 overbought.
- 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.
- 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.