Compares RSI lines of 5, 13 and 34 periods and buys when a faster line crosses above the slowest. Shorts mirror the signal, and each opposite signal reverses the position, with a 10% stop and 90% target on longs.
Best run of 6. Gold, 4 hours, spread 0.6, from run sweeps:2026-10-11-GOLD-4h-opt.tsv:158.
| Period | Up to 2026-10-11 |
| 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | 4 hours | n/a | 3,427 | 29.18 | 2,824 EUR | -1,262 |
| USD/JPY | Daily | n/a | 1,594 | 28.23 | 2,287,940 USD | -803,840 |
| Brent Crude | Daily | n/a | 627 | 33.01 | 15,438 EUR | -7,574 |
| DAX 40 | 4 hours | n/a | 3,364 | 29.79 | 14,047 EUR | -4,475 |
| GBP/USD | Daily | n/a | 1,625 | 31.02 | 13,219 USD | -8,987 |
| Gold | Daily | n/a | 1,548 | 29.46 | 2,269 EUR | -1,212 |
Charts
The code
// ============================================================== // RSI Alligator Crossover // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false jaw = RSI[34](close) teeth = RSI[5](close) lips = RSI[13](close)
16 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 3,427 trades.
The best run had a maximum drawdown of 1,262 EUR at the tested position size, against a net result of 2,824 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.