Buys when four ATR-based trailing trend lines all point up and sells short when all four point down. A position closes on the bar any one of the four trend lines changes direction.
Best run of 8. DAX 40, 30 min, spread 3, from run sweeps:2026-10-12-DAX40-30m-opt.tsv:31.
| Period | Up to 2026-10-12 |
| 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| DAX 40Best run | 30 min | n/a | 4,227 | 37.07 | 6,464 EUR | -6,387 |
| USD/JPY | Daily | n/a | 300 | 37.67 | 1,547,490 USD | -669,940 |
| EUR/USD | Daily | n/a | 270 | 41.85 | 92,581 USD | -61,503 |
| Nasdaq 100 | Daily | n/a | 265 | 36.60 | 8,905 EUR | -4,658 |
| Nasdaq 100 | 5 min | n/a | 3,845 | 36.15 | 6,189 EUR | -3,077 |
| Gold | 4 hours | n/a | 623 | 39.97 | 2,475 EUR | -857 |
| Gold | 30 min | n/a | 3,674 | 36.34 | 1,852 EUR | -1,233 |
| Gold | 1 hour | n/a | 2,258 | 37.69 | 1,674 EUR | -904 |
Charts
The code
// ============================================================== // Four Trend Band Alignment // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 30 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE upa = 0 ONCE dna = 0 ONCE tra = 1 ONCE prevtra = 1 ONCE upb = 0 ONCE dnb = 0 ONCE trb = 1 ONCE prevtrb = 1 ONCE upc = 0 ONCE dnc = 0 ONCE trc = 1 ONCE prevtrc = 1 ONCE upd = 0 ONCE dnd = 0 ONCE trd = 1 ONCE prevtrd = 1 atra = AverageTrueRange[7](close) pua = upa pda = dna prevtra = tra rua = MedianPrice - 4 * atra rda = MedianPrice + 4 * atra
100 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 8 market and timeframe combinations. The best run by trade count was DAX 40, 30 minutes, with 4,227 trades.
The best run had a maximum drawdown of 6,387 EUR at the tested position size, against a net result of 6,464 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.