Buys when the 2-bar simple average of the close crosses above the 21-period EMA plus one 21-period ATR. Closes the long when that average crosses below the 21-period EMA minus the same ATR band.
Best run of 31. Nasdaq 100, Daily, spread 3, from run pf:2026-10-12-NAS100-D.tsv:1.
| Period | Up to 2026-10-12 |
| Instrument | Nasdaq 100, Daily |
| 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Nasdaq 100Best run | Daily | 2.55 | 160 | 51.88 | 21,856 EUR | -3,442 |
| Dow Jones | Daily | 1.96 | 190 | 44.21 | 25,705 EUR | -5,554 |
| S&P 500 | Daily | 1.69 | 219 | 40.64 | 3,358 EUR | -794 |
| USD/JPY | Daily | n/a | 177 | 39.55 | 739,500 USD | -505,250 |
| USD/JPY | 1 hour | n/a | 1,632 | 37.68 | 600,080 USD | -316,610 |
| USD/JPY | 30 min | n/a | 2,294 | 37.18 | 519,210 USD | -179,390 |
| USD/JPY | 15 min | n/a | 2,370 | 35.32 | 227,800 USD | -142,250 |
| Nikkei 225 | Daily | n/a | 168 | 42.86 | 40,794 USD | -14,753 |
| Nikkei 225 | 4 hours | n/a | 345 | 42.03 | 33,144 USD | -9,332 |
| Dow Jones | 4 hours | n/a | 136 | 44.85 | 18,264 EUR | -4,954 |
| Nikkei 225 | 3 min | n/a | 2,507 | 34.94 | 13,931 USD | -7,068 |
| Brent Crude | Daily | n/a | 65 | 44.62 | 12,796 EUR | -8,680 |
| DAX 40 | 1 hour | n/a | 1,412 | 38.53 | 12,088 EUR | -3,740 |
| Nasdaq 100 | 4 hours | n/a | 465 | 41.29 | 11,513 EUR | -4,901 |
| Nasdaq 100 | 30 min | n/a | 2,505 | 37.33 | 10,647 EUR | -3,211 |
| DAX 40 | Daily | n/a | 265 | 38.11 | 10,162 EUR | -5,160 |
| Nasdaq 100 | 1 hour | n/a | 1,550 | 38.71 | 9,535 EUR | -4,505 |
| Nasdaq 100 | 15 min | n/a | 2,457 | 36.26 | 8,451 EUR | -5,105 |
| Nasdaq 100 | 10 min | n/a | 2,447 | 35.96 | 8,412 EUR | -7,078 |
| DAX 40 | 30 min | n/a | 2,476 | 36.59 | 8,307 EUR | -4,865 |
| DAX 40 | 4 hours | n/a | 426 | 37.32 | 6,392 EUR | -3,118 |
| Nasdaq 100 | 5 min | n/a | 2,424 | 35.73 | 5,481 EUR | -3,480 |
| Gold | Daily | n/a | 189 | 40.21 | 3,220 EUR | -809 |
| Gold | 4 hours | n/a | 397 | 41.81 | 3,035 EUR | -987 |
| S&P 500 | 4 hours | n/a | 448 | 41.07 | 2,492 EUR | -881 |
| Gold | 1 hour | n/a | 1,417 | 38.25 | 2,428 EUR | -720 |
| Gold | 30 min | n/a | 2,274 | 35.31 | 1,740 EUR | -971 |
| S&P 500 | 1 hour | n/a | 1,591 | 38.65 | 1,141 EUR | -991 |
| Gold | 15 min | n/a | 2,377 | 32.14 | 1,035 EUR | -988 |
| Gold | 10 min | n/a | 2,447 | 32.57 | 988 EUR | -893 |
| Gold | 5 min | n/a | 2,448 | 35.21 | 935 EUR | -583 |
Charts
Top 10 of 31 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // SMA Crossover ATR Band Long // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long only // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false price = Average[2](close) avg = ExponentialAverage[21](close) diff = AverageTrueRange[21](close) * 1 bull = avg + diff bear = avg - diff
10 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 31 market and timeframe combinations. The best run was Nasdaq 100, Daily, with a profit factor of 2.55 over 160 trades.
The best run had a maximum drawdown of 3,442 EUR at the tested position size, against a net result of 21,856 EUR.
It only takes long trades.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.