Buys when the close crosses above an ATR trailing line set 3.5 times the 5-period ATR from price. Exits when the close crosses below the same line.
Best run of 29. Nasdaq 100, Daily, spread 3, from run pf:2026-10-12-NAS100-D.tsv:3.
| 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.24 | 160 | 49.38 | 17,809 EUR | -3,127 |
| S&P 500 | Daily | 1.89 | 200 | 46.00 | 3,209 EUR | -562 |
| Nasdaq 100 | 30 min | 1.14 | 2,530 | 40.63 | 12,862 EUR | -2,644 |
| USD/JPY | 30 min | n/a | 2,090 | 39.57 | 489,940 USD | -168,720 |
| EUR/USD | Daily | n/a | 148 | 42.57 | 76,393 USD | -39,430 |
| Nikkei 225 | Daily | n/a | 163 | 47.24 | 40,671 USD | -11,763 |
| Nikkei 225 | 4 hours | n/a | 311 | 45.34 | 25,947 USD | -9,858 |
| Silver | 4 hours | n/a | 366 | 39.34 | 22,427 USD | -17,756 |
| Dow Jones | Daily | n/a | 171 | 40.94 | 17,218 EUR | -5,494 |
| DAX 40 | 1 hour | n/a | 1,454 | 41.27 | 14,788 EUR | -3,834 |
| Brent Crude | Daily | n/a | 62 | 45.16 | 14,257 EUR | -6,388 |
| Dow Jones | 4 hours | n/a | 138 | 45.65 | 12,459 EUR | -5,620 |
| Nikkei 225 | 3 min | n/a | 2,313 | 34.67 | 12,389 USD | -7,734 |
| DAX 40 | 30 min | n/a | 2,507 | 39.05 | 11,642 EUR | -3,718 |
| Nasdaq 100 | 1 hour | n/a | 1,671 | 41.71 | 11,194 EUR | -3,192 |
| Nasdaq 100 | 4 hours | n/a | 452 | 42.70 | 10,807 EUR | -3,543 |
| Nasdaq 100 | 15 min | n/a | 2,401 | 36.15 | 9,277 EUR | -4,270 |
| DAX 40 | 4 hours | n/a | 391 | 41.94 | 9,139 EUR | -3,698 |
| US Crude Oil | Daily | n/a | 145 | 44.83 | 8,321 EUR | -5,256 |
| Nasdaq 100 | 5 min | n/a | 2,206 | 38.67 | 8,200 EUR | -3,901 |
| Nasdaq 100 | 10 min | n/a | 2,330 | 36.57 | 7,453 EUR | -6,638 |
| DAX 40 | Daily | n/a | 313 | 43.13 | 4,842 EUR | -4,587 |
| Gold | 4 hours | n/a | 369 | 40.65 | 2,696 EUR | -1,159 |
| S&P 500 | 4 hours | n/a | 426 | 45.31 | 2,654 EUR | -809 |
| Gold | 30 min | n/a | 2,168 | 37.92 | 2,592 EUR | -702 |
| Gold | 1 hour | n/a | 1,336 | 39.67 | 2,328 EUR | -715 |
| Gold | Daily | n/a | 176 | 40.91 | 1,947 EUR | -1,171 |
| S&P 500 | 1 hour | n/a | 1,615 | 40.62 | 1,939 EUR | -696 |
| Gold | 10 min | n/a | 2,137 | 35.00 | 1,386 EUR | -939 |
Charts
Top 10 of 29 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // ATR Trailing Line Crossover Long // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE ts = 0 nloss = 3.5 * AverageTrueRange[5](close) prev = ts
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 29 market and timeframe combinations. The best run was Nasdaq 100, Daily, with a profit factor of 2.24 over 160 trades.
The best run had a maximum drawdown of 3,127 EUR at the tested position size, against a net result of 17,809 EUR.
It only takes long trades.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.