The strategy smooths a detrended price oscillator with a weighted moving average and trades its crosses against a lagged copy of itself. It buys when the line crosses above its lag below zero and sells short when it crosses below its lag above zero.
Best run of 6. US Crude Oil, Daily, spread 3, from run pf:2026-10-12-CRUDE-D.tsv:4.
| Period | Up to 2026-10-12 |
| Instrument | US Crude Oil, Daily |
| Spread | 3 points |
| Starting capital | 1,000,000 |
| Costs | Spread only. Commissions and overnight financing are not included. |
| Bars | Up to 200,000 bars, fewer where the instrument has less history |
| Last tested | 2026-10-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| US Crude OilBest run | Daily | 1.95 | 170 | 44.12 | 32,194 EUR | -8,017 |
| Silver | 30 min | n/a | 2,944 | 39.47 | 39,354 USD | -29,325 |
| Brent Crude | Daily | n/a | 69 | 50.72 | 32,934 EUR | -5,139 |
| Nikkei 225 | Daily | n/a | 170 | 42.94 | 32,089 USD | -23,151 |
| FTSE 100 | 4 hours | n/a | 454 | 42.29 | 3,874 EUR | -2,438 |
| Gold | 30 min | n/a | 2,909 | 41.87 | 2,287 EUR | -755 |
Charts
The code
// ============================================================== // Detrended Gaussian Crossover Reversion // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ma = ExponentialAverage[52](close) dpo = close - ma[27] alma = 0
34 more lines: the entry and exit rules.
Setup
Questions
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.
It was tested on 6 market and timeframe combinations. The best run was US Crude Oil, Daily, with a profit factor of 1.95 over 170 trades.
The best run had a maximum drawdown of 8,017 EUR at the tested position size, against a net result of 32,194 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.