Buys when the smoothed stochastic %K crosses above %D while %K is below 20 and RSI is below 50. Sells when %K crosses below %D while %K is above 80 and RSI is above 60.
Best run of 26. DAX 40, Daily, spread 3, from run pf:2026-10-12-DAX40-D.tsv:10.
| Period | Up to 2026-10-12 |
| Instrument | DAX 40, Daily |
| Spread | 3 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| DAX 40Best run | Daily | 2.89 | 141 | 75.18 | 23,157 EUR | -5,147 |
| Nasdaq 100 | 1 hour | 1.45 | 926 | 69.01 | 18,156 EUR | -3,654 |
| S&P 500 | 1 hour | 1.42 | 941 | 71.09 | 4,746 EUR | -1,059 |
| USD/JPY | 4 hours | n/a | 299 | 64.88 | 412,240 USD | -330,930 |
| Nikkei 225 | 4 hours | n/a | 221 | 70.59 | 37,470 USD | -11,804 |
| Nikkei 225 | 30 min | n/a | 1,481 | 66.24 | 34,391 USD | -9,586 |
| Nikkei 225 | 1 hour | n/a | 776 | 67.14 | 26,354 USD | -10,148 |
| Dow Jones | Daily | n/a | 128 | 78.12 | 23,751 EUR | -8,615 |
| Dow Jones | 1 hour | n/a | 308 | 68.83 | 17,377 EUR | -11,112 |
| Nasdaq 100 | 4 hours | n/a | 272 | 74.63 | 16,991 EUR | -4,971 |
| Nasdaq 100 | 30 min | n/a | 1,433 | 69.09 | 16,477 EUR | -4,137 |
| Dow Jones | 4 hours | n/a | 91 | 74.73 | 15,145 EUR | -11,189 |
| Dow Jones | 30 min | n/a | 590 | 67.63 | 13,577 EUR | -7,915 |
| Dow Jones | 10 min | n/a | 1,491 | 68.68 | 12,369 EUR | -7,982 |
| FTSE 100 | Daily | n/a | 110 | 78.18 | 11,909 EUR | -3,067 |
| Dow Jones | 15 min | n/a | 1,222 | 67.76 | 10,988 EUR | -9,453 |
| Nasdaq 100 | Daily | n/a | 90 | 73.33 | 9,984 EUR | -5,361 |
| DAX 40 | 1 hour | n/a | 847 | 66.23 | 8,263 EUR | -5,436 |
| Brent Crude | 4 hours | n/a | 153 | 70.59 | 6,313 EUR | -4,892 |
| FTSE 100 | 1 hour | n/a | 895 | 70.28 | 5,075 EUR | -2,856 |
| S&P 500 | 4 hours | n/a | 285 | 73.33 | 4,104 EUR | -1,208 |
| DAX 40 | 10 min | n/a | 1,517 | 67.57 | 3,835 EUR | -3,773 |
| S&P 500 | Daily | n/a | 120 | 77.50 | 3,362 EUR | -1,066 |
| S&P 500 | 30 min | n/a | 1,447 | 68.90 | 2,717 EUR | -1,154 |
| Gold | 4 hours | n/a | 251 | 66.14 | 1,533 EUR | -844 |
| S&P 500 | 15 min | n/a | 1,480 | 68.38 | 1,306 EUR | -1,077 |
Charts
Top 10 of 26 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // Stochastic RSI Long Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long only // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE raw = 50 ll = lowest[14](low) hh = highest[14](high)
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 26 market and timeframe combinations. The best run was DAX 40, Daily, with a profit factor of 2.89 over 141 trades.
The best run had a maximum drawdown of 5,147 EUR at the tested position size, against a net result of 23,157 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.