Goes short when the trend line flips down after a breakout above the 50-bar high, with RSI(14) above 70 in the last 10 bars. Goes long on the mirror flip up after a breakdown below the 50-bar low, with RSI below 30.
Best run of 7. GBP/USD, 1 hour, spread 1.5, from run pf:2026-10-04-GBPUSD-1h.tsv:2.
| Period | Up to 2026-10-04 |
| Instrument | GBP/USD, 1 hour |
| Spread | 1.5 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 |
|---|---|---|---|---|---|---|
| GBP/USDBest run | 1 hour | 1.22 | 1,046 | 52.29 | 15,109 USD | -2,552 |
| Nikkei 225 | 10 min | n/a | 1,482 | 51.62 | 22,331 USD | -18,072 |
| DAX 40 | 30 min | n/a | 1,593 | 47.46 | 11,365 EUR | -2,996 |
| DAX 40 | 1 hour | n/a | 1,057 | 44.84 | 9,826 EUR | -3,486 |
| FTSE 100 | 5 min | n/a | 1,063 | 60.11 | 2,236 EUR | -1,422 |
| S&P 500 | 30 min | n/a | 1,440 | 49.31 | 1,737 EUR | -903 |
| FTSE 100 | 3 min | n/a | 997 | 58.58 | 1,461 EUR | -1,460 |
Charts
The code
// ============================================================== // Trend Flip RSI Reversal // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false ONCE up = 0 ONCE dn = 0 ONCE trend = 1 ONCE hiactive = 0 ONCE loactive = 0 ONCE tsw = 0 ONCE bsw = 0 myRsi = RSI[14](close) myAtr = AverageTrueRange[10](close) basedn = MedianPrice - 2.0 * myAtr baseup = MedianPrice + 2.0 * myAtr prevup = up prevdn = dn
71 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 7 market and timeframe combinations. The best run was GBP/USD, 1 hour, with a profit factor of 1.22 over 1,046 trades.
The best run had a maximum drawdown of 2,552 USD at the tested position size, against a net result of 15,109 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.