The idea buys when the 7-period SMA crosses above the 50-period SMA while the 200-period SMA is not falling, and sells short on the mirror-image cross while it is falling. Trades use a 0.5 percent stop and 1.0 percent target.
Best run of 9. GBP/USD, 1 hour, spread 1.5, from run sweeps:2026-10-04-GBPUSD-1h-opt.tsv:9.
| 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 | n/a | 1,914 | 34.22 | 3,740 USD | -3,060 |
| USD/JPY | 1 hour | n/a | 1,608 | 35.14 | 442,120 USD | -254,210 |
| USD/JPY | 30 min | n/a | 1,811 | 32.41 | 212,690 USD | -205,340 |
| DAX 40 | 1 hour | n/a | 1,556 | 34.96 | 5,651 EUR | -1,673 |
| Nikkei 225 | Daily | n/a | 179 | 40.22 | 3,011 USD | -1,815 |
| Dow Jones | Daily | n/a | 221 | 28.51 | 1,434 EUR | -1,060 |
| Nasdaq 100 | Daily | n/a | 162 | 22.84 | 900 EUR | -545 |
| Gold | 5 min | n/a | 1,890 | 31.48 | 712 EUR | -506 |
| US Crude Oil | Daily | n/a | 176 | 32.39 | 604 EUR | -415 |
Charts
The code
// ============================================================== // SMA Crossover With Trend Slope Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false fast = Average[7](close) slow = Average[50](close) sma = Average[200](close)
28 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 9 market and timeframe combinations. The best run by trade count was GBP/USD, 1 hour, with 1,914 trades.
The best run had a maximum drawdown of 3,060 USD at the tested position size, against a net result of 3,740 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.