Trades crossovers of an 8 period and a 34 period simple moving average when the close sits near the fast average. Buys on an upward cross and sells short on a downward cross, and each opposite cross closes the open position.
Best run of 5. DAX 40, 30 min, spread 3, from run sweeps:2026-10-07-DAX40-30m-opt.tsv:22.
| Period | Up to 2026-10-07 |
| Instrument | DAX 40, 30 minutes |
| 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-10 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| DAX 40Best run | 30 min | n/a | 4,609 | 29.85 | 11,081 EUR | -6,128 |
| USD/JPY | 1 hour | n/a | 3,820 | 32.49 | 883,720 USD | -241,810 |
| USD/JPY | Daily | n/a | 97 | 34.02 | 488,910 USD | -281,800 |
| GBP/USD | Daily | n/a | 88 | 40.91 | 11,405 USD | -2,369 |
| Gold | 4 hours | n/a | 279 | 29.39 | 1,014 EUR | -518 |
Charts
The code
// ============================================================== // SMA Cross With Proximity Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 30 minutes // ============================================================== DEFPARAM CumulateOrders = false fast = Average[8](close) slow = Average[34](close)
21 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 5 market and timeframe combinations. The best run by trade count was DAX 40, 30 minutes, with 4,609 trades.
The best run had a maximum drawdown of 6,128 EUR at the tested position size, against a net result of 11,081 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.