An always-in-market system that reverses on each crossing of a 10-bar ATR trailing line. It buys when price crosses above the line and sells short when it crosses below, with no stops or targets.
Best run of 2. DAX 40, 4 hours, spread 3, from run sweeps:2026-10-03-DAX40-4h-opt.tsv:21.
| Period | Up to 2026-10-03 |
| Instrument | DAX 40, 4 hours |
| 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-03 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| DAX 40Best run | 4 hours | n/a | 3,655 | 37.98 | 14,401 EUR | -6,605 |
| Gold | 4 hours | n/a | 3,537 | 36.08 | 2,149 EUR | -796 |
Charts
The code
// ============================================================== // ATR Trailing Line Reversal // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE tsl = 0 src = close slv = 1.0 * AverageTrueRange[10](close) prev = tsl[1]
22 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 2 market and timeframe combinations. The best run by trade count was DAX 40, 4 hours, with 3,655 trades.
The best run had a maximum drawdown of 6,605 EUR at the tested position size, against a net result of 14,401 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.