The strategy buys when the close crosses above its 15-period simple moving average and sells the long when the close crosses back below it. It trades 1 contract at a time and uses no stop or target.
Best run of 10. Gold, 4 hours, spread 0.6, from run sweeps:2026-10-04-GOLD-4h-opt.tsv:85.
| Period | Up to 2026-10-04 |
| Instrument | Gold, 4 hours |
| Spread | 0.6 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 |
|---|---|---|---|---|---|---|
| GoldBest run | 4 hours | n/a | 2,077 | 26.72 | 1,560 EUR | -1,476 |
| Nikkei 225 | Daily | n/a | 794 | 29.85 | 35,671 USD | -15,855 |
| Dow Jones | Daily | n/a | 984 | 30.59 | 22,045 EUR | -6,312 |
| DAX 40 | 4 hours | n/a | 1,990 | 30.10 | 11,147 EUR | -3,852 |
| Dow Jones | 4 hours | n/a | 676 | 29.88 | 9,503 EUR | -6,090 |
| Nasdaq 100 | Daily | n/a | 749 | 30.97 | 9,489 EUR | -4,627 |
| Nasdaq 100 | 4 hours | n/a | 1,978 | 30.84 | 9,100 EUR | -4,703 |
| DAX 40 | Daily | n/a | 1,020 | 31.37 | 7,504 EUR | -3,827 |
| Gold | Daily | n/a | 926 | 27.43 | 2,218 EUR | -1,773 |
| S&P 500 | Daily | n/a | 1,024 | 30.37 | 1,950 EUR | -1,345 |
Charts
The code
// ============================================================== // Price Crosses 15-Period SMA // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false sma = Average[15](close)
9 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 10 market and timeframe combinations. The best run by trade count was Gold, 4 hours, with 2,077 trades.
The best run had a maximum drawdown of 1,476 EUR at the tested position size, against a net result of 1,560 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.