The rule is as simple as it gets: go long when RSI(14) crosses above 50 and short when it crosses below. A trade closes when RSI moves back to the wrong side of 50 or hits a 1% stop. In testing, this idea lost money on every market and timeframe.
Best run of 16. DAX 40, 5 min, spread 3, from run sweeps:2026-09-07-DAX40-5m-opt.tsv:10.
| Period | Up to 2026-09-07 |
| Instrument | DAX 40, 5 minutes |
| Spread | 3 points |
| Contracts | 1 |
| 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-09-07 |
| positionSize Contracts per trade | 1 |
| rsiPeriod RSI length | 14 |
| rsiMidLevel RSI midline | 50 |
| stopLossPct Protective stop, percent | 1 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| DAX 40Best run | 5 min | n/a | 12,155 | 18.48 | -34,668 EUR | -34,722 |
| Gold | 1 hour | n/a | 6,591 | 20.27 | -1,911 EUR | -2,440 |
| Gold | 30 min | n/a | 11,614 | 22.46 | -2,758 EUR | -6,360 |
| DAX 40 | 1 hour | n/a | 6,110 | 21.83 | -4,811 EUR | -8,912 |
| Gold | 5 min | n/a | 11,900 | 18.66 | -5,219 EUR | -5,280 |
| Gold | 15 min | n/a | 11,613 | 16.98 | -6,169 EUR | -7,817 |
| S&P 500 | 1 hour | n/a | 6,693 | 20.04 | -6,507 EUR | -6,607 |
| S&P 500 | 30 min | n/a | 11,500 | 23.39 | -6,588 EUR | -8,990 |
| S&P 500 | 15 min | n/a | 11,211 | 18.16 | -10,182 EUR | -10,216 |
| Nasdaq 100 | 1 hour | n/a | 6,517 | 20.75 | -10,645 EUR | -15,474 |
| S&P 500 | 5 min | n/a | 11,567 | 16.29 | -11,721 EUR | -11,721 |
| Nasdaq 100 | 30 min | n/a | 11,200 | 23.70 | -16,885 EUR | -21,340 |
| DAX 40 | 30 min | n/a | 11,160 | 21.92 | -18,976 EUR | -25,909 |
| Nasdaq 100 | 15 min | n/a | 10,857 | 19.83 | -20,207 EUR | -20,276 |
| DAX 40 | 15 min | n/a | 11,221 | 19.99 | -30,638 EUR | -30,919 |
| Nasdaq 100 | 5 min | n/a | 11,334 | 18.76 | -30,990 EUR | -31,177 |
Charts
Top 10 of 16 runs. The full list is in the table above.
The code
// ============================================================ // RSI Midline Trend // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long & short // Timeframe tested: 5 minutes // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 1 // contracts per trade rsiPeriod = 14 // RSI length rsiMidLevel = 50 // RSI midline that splits bullish from bearish stopLossPct = 1 // protective stop, percent of entry price // --- Indicators --- rsiValue = RSI[rsiPeriod](close)
26 more lines: the entry and exit rules.
Setup
Questions
The code runs, but every backtest lost money. It is best treated as a study of why a plain RSI midline cross fails, not as a live system.
DAX 40, Gold, Nasdaq 100 and S&P 500 on intraday charts. The smallest loss was Gold 1 hour at EUR -1,910.90, and the largest were EUR -30,638.10 on DAX 40 15 minutes and EUR -30,989.60 on Nasdaq 100 5 minutes.
At 1 contract, the DAX 40 5 minute run had a max drawdown of EUR 34,722.20, almost equal to its total loss.
RSI(14) flips around 50 constantly on short bars, so the system trades thousands of times and pays the 3 point spread on each one.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.