Join waitlist
Strategies / Mean reversion / Weighted Average Z Score Reversion

Weighted Average Z Score Reversion

This idea buys when the price moves well below its recent average and begins turning back up. It closes the long when the z-score returns above a high level and starts falling, using one long position at a time.

Mean reversionLong onlySwingSilver1 hour
3.77Profit factor
537,148Net profit USD
62.80%Win rate
1,777Trades
-38,840Max drawdown
302Avg trade

Best run of 18. Silver, 1 hour, spread 2, from run pf:2026-10-12-SILVER-1h.tsv:18.

Entry rules, long

  1. The z-score is higher than its value on the prior bar.
  2. A long is opened only when no long position is already open.

Exit rules

  1. No stop or target is coded.

Test conditions

PeriodUp to 2026-10-12
InstrumentSilver, 1 hour
Spread2 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-12

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
SilverBest run1 hour3.77 1,77762.80537,148 USD-38,840
FTSE 100Daily2.17 19678.0611,394 EUR-2,643
USD/JPY4 hoursn/a 54766.18282,510 USD-248,460
Dow JonesDailyn/a 24176.3529,166 EUR-8,615
Nikkei 2254 hoursn/a 39770.0323,922 USD-11,536
SilverDailyn/a 20469.6120,564 USD-11,221
Dow Jones1 hourn/a 63569.7617,886 EUR-8,696
DAX 404 hoursn/a 48969.9417,439 EUR-5,659
Nasdaq 1004 hoursn/a 50273.9016,773 EUR-5,641
Nasdaq 1001 hourn/a 1,83566.7614,448 EUR-4,337
Nikkei 2251 hourn/a 1,42463.3412,767 USD-10,860
Nasdaq 100Dailyn/a 16872.0210,166 EUR-4,522
DAX 40Dailyn/a 22467.4110,131 EUR-5,272
FTSE 1001 hourn/a 1,71967.834,514 EUR-2,692
S&P 5004 hoursn/a 50073.204,077 EUR-1,384
FTSE 1004 hoursn/a 45768.053,628 EUR-2,635
S&P 500Dailyn/a 23876.053,191 EUR-1,098
S&P 5001 hourn/a 1,88266.152,810 EUR-1,088

Charts

Results by run

Top 10 of 18 runs. The full list is in the table above.

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

// ==============================================================
// Weighted Average Z Score Reversion
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Mean reversion
// Direction: Long only
// Timeframe tested: 1 hour
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE rate = 0

fp = WeightedAverage[3](TotalPrice)
sd = STD[17](fp)
em = ExponentialAverage[17](fp)

13 more lines: the entry and exit rules.

Setup

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

WMAEMAStandard Deviation
Read this firstKnown weaknesses2 points
  • Results include the spread only. Commissions and overnight financing are not included.
  • The code is published as it was backtested and has not been compiled again since.

Questions

About this strategy

Can I run Weighted Average Z Score Reversion in ProOrder?

Yes. The code is ProBuilder and runs as an automated ProOrder system. Backtest it on your own account with your own spread and position size before trading it live.

Which markets was it tested on?

It was tested on 18 market and timeframe combinations. The best run was Silver, 1 hour, with a profit factor of 3.77 over 1,777 trades.

How large was the drawdown?

The best run had a maximum drawdown of 38,840 USD at the tested position size, against a net result of 537,148 USD.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Reversal Pattern With Chaikin Volatility

Uses the same indicator.

2.26 PF · 6,872 trades

SMA Crossover With RSI Exit

Best run on the same market, Silver.

2.13 PF · 8,999 trades

Turnaround Tuesday

Also a mean reversion strategy.

3.80 PF · 39 trades

See how ProRealAlgos combines strategies like this into one automated portfolio.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs