Buys once per low zone after StochRSI stays below 20 for 3 bars. Closes the long once per high zone after StochRSI stays above 80 for 3 bars.
Best run of 11. EUR/USD, 4 hours, spread 1, from run sweeps:2026-10-04-EURUSD-4h-opt.tsv:12.
| Period | Up to 2026-10-04 |
| Instrument | EUR/USD, 4 hours |
| Spread | 1 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 |
|---|---|---|---|---|---|---|
| EUR/USDBest run | 4 hours | n/a | 1,690 | 59.76 | 44,602 USD | -28,150 |
| Nikkei 225 | 4 hours | n/a | 960 | 63.33 | 25,511 USD | -9,289 |
| Dow Jones | Daily | n/a | 570 | 66.14 | 20,049 EUR | -10,684 |
| DAX 40 | Daily | n/a | 585 | 67.52 | 16,275 EUR | -5,306 |
| Nasdaq 100 | Daily | n/a | 430 | 63.72 | 13,427 EUR | -5,309 |
| US Crude Oil | Daily | n/a | 420 | 61.90 | 11,024 EUR | -9,821 |
| Dow Jones | 4 hours | n/a | 390 | 65.38 | 10,956 EUR | -9,623 |
| FTSE 100 | Daily | n/a | 434 | 67.51 | 10,046 EUR | -2,705 |
| Nasdaq 100 | 4 hours | n/a | 1,214 | 61.78 | 7,916 EUR | -4,000 |
| S&P 500 | Daily | n/a | 616 | 62.01 | 3,929 EUR | -1,277 |
| S&P 500 | 4 hours | n/a | 1,235 | 62.59 | 1,588 EUR | -1,215 |
Charts
Top 10 of 11 runs. The full list is in the table above.
The code
// ============================================================== // StochRSI Zone Persistence Signal // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long only // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE dir = 0 ONCE dur = 0 ONCE pers = 0 ONCE adv = 0 myRsi = RSI[3](close) lo = Lowest[3](myRsi) hi = Highest[3](myRsi) zone = 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 11 market and timeframe combinations. The best run by trade count was EUR/USD, 4 hours, with 1,690 trades.
The best run had a maximum drawdown of 28,150 USD at the tested position size, against a net result of 44,602 USD.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.