Buys a pullback to EMA(21) above EMA(200) when RSI(14) is between 38 and 55, above its last 3 values, and ADX(14) is above 20. Exits at a 1% target or a 2% stop from the entry.
Best run of 18. Silver, 15 min, spread 2, from run sweeps:2026-10-12-SILVER-15m-opt.tsv:4.
| Period | Up to 2026-10-12 |
| Instrument | Silver, 15 minutes |
| Spread | 2 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 |
|---|---|---|---|---|---|---|
| SilverBest run | 15 min | n/a | 286 | 68.88 | 4,978 USD | -4,491 |
| USD/JPY | 30 min | n/a | 10 | 90.00 | 79,890 USD | -27,700 |
| USD/JPY | 15 min | n/a | 3 | 100.00 | 34,170 USD | -21,350 |
| EUR/USD | 1 hour | n/a | 43 | 74.42 | 10,180 USD | -9,898 |
| Silver | Daily | n/a | 144 | 64.58 | 1,290 USD | -1,253 |
| DAX 40 | Daily | n/a | 120 | 60.83 | 1,228 EUR | -1,086 |
| EUR/USD | 15 min | n/a | 1 | 100.00 | 1,131 USD | -470 |
| FTSE 100 | 30 min | n/a | 50 | 78.00 | 1,040 EUR | -411 |
| S&P 500 | 4 hours | n/a | 156 | 71.15 | 752 EUR | -430 |
| Nikkei 225 | 1 min | n/a | 1 | 100.00 | 615 USD | -237 |
| Dow Jones | 2 min | n/a | 1 | 100.00 | 463 EUR | -411 |
| S&P 500 | 30 min | n/a | 57 | 71.93 | 400 EUR | -356 |
| GBP/USD | 15 min | n/a | 3 | 100.00 | 358 USD | -96.00 |
| GBP/USD | 30 min | n/a | 3 | 100.00 | 347 USD | -54.30 |
| Nasdaq 100 | 2 min | n/a | 1 | 100.00 | 242 EUR | -159 |
| FTSE 100 | 2 min | n/a | 1 | 100.00 | 99.00 EUR | -57.30 |
| Gold | 2 min | n/a | 2 | 100.00 | 94.80 EUR | -29.30 |
| Gold | 1 min | n/a | 2 | 100.00 | 88.10 EUR | -47.20 |
Charts
Top 10 of 18 runs. The full list is in the table above.
The code
// ============================================================== // Pullback to EMA With ADX // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: 15 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE dx = 0 emalong = ExponentialAverage[200](close) emashort = ExponentialAverage[21](close) myRsi = RSI[14](close) myAtr = AverageTrueRange[14](close) hh = highest[20](high) ll = lowest[20](low) mid = (hh + ll) / 2 pdm = max(high - high[1], 0) mdm = max(low[1] - low, 0) myTr = max(high - low, max(abs(high - close[1]), abs(low - close[1]))) rp = WilderAverage[14](pdm) rm = WilderAverage[14](mdm)
20 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 18 market and timeframe combinations. The best run by trade count was Silver, 15 minutes, with 286 trades.
The best run had a maximum drawdown of 4,490 USD at the tested position size, against a net result of 4,978 USD.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.