Trades regular or hidden RSI divergence at 5 bar pivots, filtered by the Ichimoku cloud and a 200 period EMA. Longs close when the RSI crosses above 75, and shorts close when it crosses above 25.
Best run of 12. Gold, 5 min, spread 0.6, from run sweeps:2026-10-11-GOLD-5m-opt.tsv:21.
| Period | Up to 2026-10-11 |
| Instrument | Gold, 5 minutes |
| 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | 5 min | n/a | 1,676 | 51.61 | 1,327 EUR | -639 |
| USD/JPY | 4 hours | n/a | 354 | 56.21 | 409,030 USD | -318,610 |
| EUR/USD | 2 min | n/a | 1,643 | 45.53 | 33,732 USD | -27,750 |
| EUR/USD | 15 min | n/a | 1,625 | 52.06 | 29,066 USD | -29,055 |
| Nasdaq 100 | Daily | n/a | 93 | 61.29 | 25,433 EUR | -3,031 |
| US Crude Oil | 4 hours | n/a | 232 | 62.50 | 17,342 EUR | -4,454 |
| Silver | Daily | n/a | 106 | 58.49 | 14,524 USD | -12,385 |
| Brent Crude | 4 hours | n/a | 174 | 57.47 | 10,456 EUR | -4,655 |
| FTSE 100 | Daily | n/a | 91 | 57.14 | 5,543 EUR | -4,341 |
| US Crude Oil | 5 min | n/a | 1,672 | 51.97 | 4,823 EUR | -3,865 |
| S&P 500 | Daily | n/a | 128 | 65.62 | 2,417 EUR | -1,760 |
| Gold | 4 hours | n/a | 314 | 60.19 | 839 EUR | -768 |
Charts
Top 10 of 12 runs. The full list is in the table above.
The code
// ============================================================== // RSI Divergence Ichimoku Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: 5 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE lastplbar = 0 ONCE lastplosc = 0 ONCE lastpllow = 0 ONCE countpl = 0 ONCE lastphbar = 0 ONCE lastphosc = 0 ONCE lastphhigh = 0 ONCE countph = 0 osc = RSI[14](close) ema = ExponentialAverage[200](close) conv = (lowest[9](low) + highest[9](high)) / 2 base = (lowest[26](low) + highest[26](high)) / 2 leadone = (conv + base) / 2 leadtwo = (lowest[52](low) + highest[52](high)) / 2 abovecloud = max(leadone, leadtwo) belowcloud = min(leadone, leadtwo) bullsig = 0 bearsig = 0
52 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 12 market and timeframe combinations. The best run by trade count was Gold, 5 minutes, with 1,676 trades.
The best run had a maximum drawdown of 639 EUR at the tested position size, against a net result of 1,327 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.