Reverses into a long whenever the Supertrend trend is up and RSI(14) is above 50, and into a short whenever it is down and RSI is below 50. Closes a long above RSI 70 and a short below RSI 30.
Best run of 9. Gold, 4 hours, spread 0.6, from run sweeps:2026-10-11-GOLD-4h-opt.tsv:37.
| 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 | 2,912 | 51.27 | 1,594 EUR | -860 |
| Nikkei 225 | Daily | n/a | 1,081 | 53.19 | 46,724 USD | -20,996 |
| Silver | Daily | n/a | 995 | 48.44 | 29,036 USD | -21,427 |
| Dow Jones | Daily | n/a | 1,244 | 53.70 | 23,586 EUR | -15,384 |
| Brent Crude | Daily | n/a | 424 | 55.42 | 20,722 EUR | -7,989 |
| Nasdaq 100 | Daily | n/a | 1,190 | 45.80 | 17,687 EUR | -4,882 |
| Dow Jones | 4 hours | n/a | 990 | 54.75 | 15,984 EUR | -9,974 |
| US Crude Oil | Daily | n/a | 886 | 50.23 | 13,914 EUR | -7,933 |
| Gold | Daily | n/a | 1,200 | 50.75 | 1,878 EUR | -902 |
Charts
The code
// ============================================================== // Supertrend RSI Reversal // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE upper = 0 ONCE lower = 0 ONCE dir = 1 ONCE st = 0 myAtr = AverageTrueRange[10](close) prevupper = upper prevlower = lower prevst = st bup = MedianPrice + 3 * myAtr blo = MedianPrice - 3 * myAtr
48 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 9 market and timeframe combinations. The best run by trade count was Gold, 4 hours, with 2,912 trades.
The best run had a maximum drawdown of 860 EUR at the tested position size, against a net result of 1,594 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.