The system holds a long position while the 50-period SMA is above the 200-period SMA, and a short position while it is below. It reverses when the averages cross, with the new trade opened one bar after the exit.
Best run of 26. EUR/USD, 2 min, spread 1, from run sweeps:2026-10-04-EURUSD-2m-opt.tsv:15.
| Period | Up to 2026-10-04 |
| Instrument | EUR/USD, 2 minutes |
| 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 | 2 min | n/a | 1,308 | 30.43 | 142,133 USD | -51,117 |
| USD/JPY | Daily | n/a | 73 | 32.88 | 1,245,290 USD | -1,024,400 |
| USD/JPY | 10 min | n/a | 1,179 | 36.47 | 562,980 USD | -254,900 |
| USD/JPY | 30 min | n/a | 1,209 | 34.00 | 412,720 USD | -286,300 |
| USD/JPY | 5 min | n/a | 1,244 | 35.21 | 349,230 USD | -182,580 |
| USD/JPY | 3 min | n/a | 1,242 | 33.74 | 181,050 USD | -123,440 |
| EUR/USD | Daily | n/a | 74 | 45.95 | 174,563 USD | -31,840 |
| Nikkei 225 | Daily | n/a | 62 | 35.48 | 58,877 USD | -22,118 |
| EUR/USD | 4 hours | n/a | 280 | 35.71 | 47,257 USD | -46,970 |
| Silver | 2 min | n/a | 1,239 | 34.38 | 20,916 USD | -19,504 |
| Silver | 10 min | n/a | 1,251 | 31.18 | 20,864 USD | -18,027 |
| US Crude Oil | 4 hours | n/a | 131 | 40.46 | 13,551 EUR | -7,984 |
| GBP/USD | Daily | n/a | 73 | 42.47 | 11,834 USD | -11,012 |
| Brent Crude | 4 hours | n/a | 96 | 42.71 | 11,793 EUR | -6,091 |
| Nasdaq 100 | 4 hours | n/a | 180 | 32.78 | 5,773 EUR | -5,464 |
| Gold | Daily | n/a | 59 | 45.76 | 4,277 EUR | -1,631 |
| S&P 500 | Daily | n/a | 62 | 51.61 | 3,514 EUR | -2,003 |
| Brent Crude | 2 min | n/a | 1,190 | 33.70 | 2,852 EUR | -2,472 |
| Gold | 5 min | n/a | 1,215 | 32.35 | 2,506 EUR | -638 |
| Gold | 10 min | n/a | 1,241 | 33.76 | 2,296 EUR | -1,466 |
| Gold | 3 min | n/a | 1,209 | 34.49 | 2,228 EUR | -662 |
| Gold | 1 hour | n/a | 711 | 36.85 | 1,728 EUR | -1,416 |
| Gold | 4 hours | n/a | 208 | 34.13 | 1,636 EUR | -1,209 |
| Gold | 15 min | n/a | 1,225 | 33.14 | 1,583 EUR | -996 |
| Gold | 2 min | n/a | 1,274 | 33.59 | 1,450 EUR | -921 |
| Gold | 1 min | n/a | 1,270 | 32.76 | 834 EUR | -750 |
Charts
Top 10 of 26 runs. The full list is in the table above.
The code
// ============================================================== // SMA 50/200 Trend Reversal // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 2 minutes // ============================================================== DEFPARAM CumulateOrders = false fast = Average[50](close) slow = Average[200](close)
15 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 by trade count was EUR/USD, 2 minutes, with 1,308 trades.
The best run had a maximum drawdown of 51,117 USD at the tested position size, against a net result of 142,133 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.