The idea buys when a derivative oscillator built from smoothed RSI(14) crosses above 0. It sells the long once that oscillator is at or above 0 and stops rising.
Best run of 6. Gold, 4 hours, spread 0.6, from run sweeps:2026-10-04-GOLD-4h-opt.tsv:25.
| Period | Up to 2026-10-04 |
| Instrument | Gold, 4 hours |
| Spread | 0.6 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-04 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | 4 hours | n/a | 1,361 | 40.12 | 1,180 EUR | -618 |
| Nikkei 225 | 4 hours | n/a | 1,108 | 44.40 | 17,476 USD | -7,564 |
| Silver | Daily | n/a | 532 | 40.23 | 13,115 USD | -6,840 |
| DAX 40 | 4 hours | n/a | 1,352 | 46.01 | 12,013 EUR | -3,661 |
| Nasdaq 100 | Daily | n/a | 499 | 46.49 | 4,749 EUR | -4,169 |
| S&P 500 | Daily | n/a | 692 | 44.08 | 1,457 EUR | -893 |
Charts
The code
// ============================================================== // Derivative Oscillator Zero Cross // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long only // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false myRsi = RSI[14](close) emafirst = ExponentialAverage[5](myRsi) emasecond = ExponentialAverage[3](emafirst) sig = Average[9](emasecond) myDo = emasecond - sig
11 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 by trade count was Gold, 4 hours, with 1,361 trades.
The best run had a maximum drawdown of 618 EUR at the tested position size, against a net result of 1,180 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.